madetech / bdd-rails

A starter kit for testing BDD in rails
5 stars 3 forks source link

Error when including support files #1

Open awongh opened 8 years ago

awongh commented 8 years ago

Hi Thanks for this repo. I started an app and was trying to run it on codeship.

I ran into an error like this:

bundler: failed to load command: rspec (/home/rof/cache/bundler/ruby/2.2.0/bin/rspec)
NoMethodError:  method `infer_spec_type_from_file_location!' for #<RSpec::Core::Configuration:0x000000028c09e0>
/spec/support/rspec_run_conditions.rb:4:in `block in <top (required)>'

I tracked it down to the fact that for some reason on this codeship box ( but not on my local ) the order of files isn't guaranteed.

I was able to fix it with a sort before the each.

https://github.com/awongh/bdd-rails/blob/d6da21c06300e84a5529c14b0bba2592e873d3a6/lib/bdd_rails/templates/install/spec/spec_helper.rb#L10

Let me know if you would like a pull request.

lukemorton commented 8 years ago

I'd love for you to open a pull request!