How can I use the fixtures that come with the stock minitest in Cucumber steps?
Say, I have `test/fixtures/users.yml:
harry:
email: [email protected]
password: caputdraconis
In minitest, this would be used in e.g. @user = users(:harry). But it cannot be used in Cucumber: undefined method 'users' for #<Cucumber::Rails::World:0xaf2cd1c> (NoMethodError).
How can I make the fixtures and their helpers available in Cucumber? Is this a good idea in the first place?
Place this into your
features/support/env.rb:My fixtures are located in
test/fixturessince I'm using Minitest, so you should update yourfixtures_folderto match the location of your fixtures if you're using RSpec.After this you can do something like:
inside your step definitions.