While I have discovered RSpec on Rails for a while ago, I haven’t really used it yet.
But today I have moved Frontcamp tests to RSpec specifications, finally. Even without test2spec (it failed to translate my tests for some reason), transition to specs did not took too much time. I’ve accomplished it in 2-3 hours or so.
What should I say? I like it. My tests were completely bad organized before, I’ve found that I’ve missed few bugs in an implementation and I’ve found that my test aren’t covering some important aspects. And for all this, thank you, RSpec team.
To not to change my habit to type `rake’ to run tests I’ve written very simple lib/tasks/rakespec.rake:
1 2 3 |
task :default do Rake::Task["spec"].invoke end |
Also, I’m very excited about `spec -f s’ and `spec -f h’ output.
I have been warned that running tests without rails_spec_server (now it seems to be called rails_spec_runner) could be not very fast. But since I’ve found that I need to restart rails_spec_runner mostly after each rails_spec invocation (probably some bug, or may be I’m missing something), I’ve tried to run `spec’ and I’ve found its speed reasonable and acceptable.
More to report later. Anyway, my specifications are in a trunk already.





















