I have created fixtures located in spec/fixtures/
directory. I am running my Cucumber tests without any problem until I needed to change a value in my fixtures, but I cannot see the changes when I run the test. I am running using:
cucumber features/my_feature_cucumber.feature
I tried also:
bundle exec cucumber features/my_feature_cucumber.feature
and I am using byebug to verify the contents in the database.
All the time in has the same data as though there were no changes in the fixtures. I am losing something about the way it is loaded in every execution?
Ok, maybe it was a silly question, but I would like to share the answer in case anyone else face this scenario in the future.
The answer is in the fixtures itself. They are created under spec
directory, which means they are part of Rspec
. Cucumber uses it but he doesn't reload them. So the way to see the changes reflected in Cucumber is simple executing Rspec
, he will make the reloads.
rspec
or
bundle exec rspec
works to see the changes reflected in Cucumber.