Permalink
Browse files

Merge branch 'capybara_version_required'

  • Loading branch information...
2 parents 2a44340 + 75d0421 commit 3fc1edc283047c3d64afa5c978a16244cb1ace26 @alindeman alindeman committed Feb 10, 2014
Showing with 6 additions and 2 deletions.
  1. +1 −1 Gemfile
  2. +1 −0 lib/rspec/rails/mocks.rb
  3. +3 −0 lib/rspec/rails/vendor/capybara.rb
  4. +1 −1 rspec-rails.gemspec
View
2 Gemfile
@@ -26,7 +26,7 @@ gem 'sqlite3', '~> 1.3.6'
# Capybara versions that support RSpec 3 only support RUBY_VERSION >= 1.9.3
if RUBY_VERSION >= '1.9.3'
- gem 'capybara', :github => 'jnicklas/capybara'
+ gem 'capybara', '2.2.0'
end
if RUBY_VERSION < '1.9.2'
View
1 lib/rspec/rails/mocks.rb
@@ -1,4 +1,5 @@
require 'active_support'
+require 'active_support/deprecation'
require 'active_support/core_ext'
require 'active_model'
View
3 lib/rspec/rails/vendor/capybara.rb
@@ -9,6 +9,9 @@
end
if defined?(Capybara)
+ require 'rspec/support/version_checker'
+ RSpec::Support::VersionChecker.new('capybara', Capybara::VERSION, '2.2.0').check_version!
+
RSpec.configure do |c|
if defined?(Capybara::DSL)
c.include Capybara::DSL, :type => :feature
View
2 rspec-rails.gemspec
@@ -31,7 +31,7 @@ Gem::Specification.new do |s|
s.add_runtime_dependency(%q<activemodel>, [">= 3.0"])
s.add_runtime_dependency(%q<actionpack>, [">= 3.0"])
s.add_runtime_dependency(%q<railties>, [">= 3.0"])
- %w[core expectations mocks].each do |name|
+ %w[core expectations mocks support].each do |name|
if RSpec::Rails::Version::STRING =~ /[a-zA-Z]+/ # prerelease builds
s.add_runtime_dependency "rspec-#{name}", "= #{RSpec::Rails::Version::STRING}"
else

0 comments on commit 3fc1edc

Please sign in to comment.