Skip to content

Embed URL

HTTPS clone URL

Subversion checkout URL

You can clone with
or
.
Download ZIP
Rails 3.1: Test engine with Cucumber & test/dummy app

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
@visoft

Thanks for this!

@coryschires

+1 Worked for me too!

@amazing-jay

+1 for me too

@xavierdutreilh

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

@StephD

+1 Thanks

@harmdewit

+1 Woah this worked, thanks!

@segantii-alex-falkowski

I keep getting

Migrations are pending. To resolve this issue, run:

    bin/rake db:migrate RAILS_ENV=test

Even though I run it. I keep getting this message. Any idea?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Something went wrong with that request. Please try again.