Possible regression in pattern configuration for 2.14
Created by: iamvery
I have managed to narrow an issue with turnip down to what may be a regression in RSpec 2.14.
It seems that specifying additional patterns to match files on does that load specs in those files under 2.14. This is how turnip managed to load .feature
files for their gherkin features.
I dug into RSpec's source a bit and observed that files_to_run
appears to get set earlier under 2.14 and is not updated when the pattern is changed. I'm not completely sure what that means and was not able to narrow down the change.
I did however come up with a simplified example and steps to reproduce:
- Clone my example from https://github.com/iamvery/rspec-config-regression
- Run the specs under 2.13 with bundler
bundle install # make sure 2.13 is installed
bundle exec rspec
- Observe that two specs are run (the one in
a_spec.rb
anda_test.rb
) - Check out commit tag using RSpec 2.14 bundle
git checkout rspec-2.14
- Run the specs under 2.14
bundle install # make sure 2.14 is installed
bundle exec rspec
- Observe that only one spec is run (the one in
a_spec.rb
)
Hopefully these instructions are clear. I wasn't