public

Rails 3.1: Test engine with Cucumber & test/dummy app

  • Download Gist
rails_test_engine_cucumber.markdown
Markdown

Run from the root of the engine project:

rails generate cucumber:install --capybara

Edit features/support/env.rb and add to the top:

ENV["RAILS_ENV"] ||= "test"
require File.expand_path("../../../test/dummy/config/environment.rb",  __FILE__)
ENV["RAILS_ROOT"] ||= File.dirname(__FILE__) + "../../../test/dummy"

Now from the root of the engine project:

cucumber features

Thanks for this!

+1 Worked for me too!

Woohoo, nice gist. Worked for me too. :-)

+1 Woah this worked, thanks!

Please sign in to comment on this gist.

Something went wrong with that request. Please try again.