I have a Rails 4.1 project that uses RSpec and Cucumber.
I've recently added fixture_builder.
fixture_builder.rb includes logic to rebuild fixtures any time the file changes.
This works fine for RSpec with
By default, Cucumber loads all *.rb files in the same directory as the feature(s) it's running and all subdirectories of that directory, so you can put your
require in any file you want in any of those directories.
The conventional thing to do is to put 'support' code like
features/support/env.rb, or in another file in
features/support if your
env.rb gets too big.
The cucumber-rails gem provides a generator that sets up Cucumber to work with Rails. If you haven't already, install the gem and run
rails g cucumber:install
features/support/env.rb and the rest of the usual Rails + Cucumber setup.