Shiny happy people coding

Coding with smile

Since cucumber=0.3.4, He Has Difficult With Merb

| Comments

Since Cucumber 0.3.4, there are a big change. With this change, you need modify your using of Cucumber with Merb. In History.txt of Cucumber, you can read :

** IMPORTANT UPGRADE NOTES FOR RAILS USERS ** Running Cucumber features in the same Ruby interpreter as Rake doesn't seem to work, so you have to explicitly tell the task to fork (like it was doing by default in prior versions). In lib/tasks/cucumber.rake: do |t| t.fork = true # Explicitly fork t.cucumber_opts = %w{--format pretty} end (If you run script/generate cucumber this will be done for you). Alternatively you can omit forking and run features like this: RAILS_ENV=test rake features However, setting the RAILS_ENV is easy to forget, so I don't recommend relying on this.

This note is true to Merb user too. By default, all Merb user use the Roman's merb_cucumber. But the generator is not good now. The rake task rake features doesn't use the good cucumber options.

After a long and big fight with cucumber, I success to find all good options. Now with this options, I have same behaviour than before. If you want see an example in a Merb application, you can see my commit on Oupsnow. I fork too the Roman merb_cucumber and add a patch to can use cucumber 0.3.4 and more.

EDIT : My modif of merb_cucumber is integrate to Roman branch.

Traduction fran├žaise