If you haven't already done so, you might also take a look at the
following gems. This is what I have been using in my BDD workflow and
really speeds the process up for me.
autotest-standalone
autotest-rails-pure
autotest-fsevent
autotest-growl
I run this in a second terminal window and watch the Red-Green growl
notifications as I work through the Red-Green-Refactor cycle.
--
Posted via http://www.ruby-forum.com/.
2) Use Spork and Autotest. Follow
http://railstutorial.org/chapters/static-pages#sec:testing_tools to get
Autotest setup. Note that you don't need the Spork hack with the newest
version of Spork.
3) When using Autotest, consider removing 'bundle exec' from the RSpec
command. In future versions of RSpec, you'll be able to do this with a
configuration setting, or you can get the current RSpec master which has
committed the option already (see commit here
https://github.com/rspec/rspec-core/commit/1ff93b0969a0f1a6c8d4cf39ed9b7466c7eb10c8).
If you want to freedom patch to get rid of 'bundle exec' see this post:
http://www.arailsdemo.com/posts/36. (There's some other information in
the Post #35...)
I haven't seen how these tips affect Cucumber yet, so you'll have to
experiment on your own for now.
But don't you always need to do that? Isn't that the task that clears
out the test DB? Or is that not an issue since you're (hopefully)
running your specs transactionally?
Best,
--
Marnen Laibow-Koser
http://www.marnen.org
mar...@marnen.org
Sent from my iPhone
As far as I can tell, the difference between 'rake spec' and 'rspec
spec' is 'db:test:prepare'. When all tests pass with 'rake spec',
they're also passing with 'rspec spec', only faster. If you check the
test database after running 'rspec spec', it should be empty. So that's
why I think 'rake spec' isn't necessary, unless the database schema has
changed.
I do have
config.use_transactional_fixtures = true
in my spec_helper file. If the setting is set to false, then the
database could have residual data in it after running the tests.
That could be a confusion between version 1.3 and 2.
Compare this:
https://github.com/thoughtbot/factory_girl#readme
https://github.com/thoughtbot/factory_girl/tree/1.3.x#readme
You could be looking at the 1.3 documentation (telling you to
use the Factory class), but installed version 2.0
(that has the FactoryGirl class).
HTH,
Peter
Spork.each_run do
require 'factory_girl_rails'
end
adam wrote in post #976883:
> Strangely - I am not getting this error when running seperate
> features, only when running just "cucucmber --drb"
--
Posted via http://www.ruby-forum.com/.