Skip to content
Browse files

Update dependencies in the gemspec

Switch dependency away from 'rspec' because it loads core, which loads the DSL.
This change allows rspec-rails to live side-by-side with minitest-rails.
  • Loading branch information...
1 parent 90f3302 commit f5a573518420629b80f10bf1b8a01faf54ae1e1d @blowmage blowmage committed Oct 4, 2012
Showing with 6 additions and 4 deletions.
  1. +6 −4 rspec-rails.gemspec
View
10 rspec-rails.gemspec
@@ -24,10 +24,12 @@ Gem::Specification.new do |s|
s.add_runtime_dependency(%q<activesupport>, [">= 3.0"])
s.add_runtime_dependency(%q<actionpack>, [">= 3.0"])
s.add_runtime_dependency(%q<railties>, [">= 3.0"])
- if RSpec::Rails::Version::STRING =~ /[a-zA-Z]+/ # prerelease builds
- s.add_runtime_dependency "rspec", "= #{RSpec::Rails::Version::STRING}"
- else
- s.add_runtime_dependency "rspec", "~> #{RSpec::Rails::Version::STRING.split('.')[0..1].concat(['0']).join('.')}"
+ %w[core expectations mocks].each do |name|
+ if RSpec::Rails::Version::STRING =~ /[a-zA-Z]+/ # prerelease builds
+ s.add_runtime_dependency "rspec-#{name}", "= #{RSpec::Rails::Version::STRING}"
+ else
+ s.add_runtime_dependency "rspec-#{name}", "~> #{RSpec::Rails::Version::STRING.split('.')[0..1].concat(['0']).join('.')}"
+ end
end
s.add_development_dependency 'rake', '~> 0.9.2'

0 comments on commit f5a5735

Please sign in to comment.
Something went wrong with that request. Please try again.