1
0
Fork 0
mirror of https://github.com/thoughtbot/shoulda-matchers.git synced 2022-11-09 12:01:38 -05:00

Fix route_matcher specs in Rails 4

The rails assertion that underlies the `route_matcher` matcher has
changed in Rails 4 to depend on the `message` method from MiniTest.
RSpec is smart enough to make that method available, but only for
controller and routing specs (and only in 2.13.1+).

I marked the `route_matcher` specs as controller specs and updated the
rspec-rails gem development dependency to 2.13.1 or later (but less than 3).
This commit is contained in:
Derek Prior 2013-05-17 11:17:21 -04:00 committed by Elliot Winkler
parent 6e1ff3a8c3
commit d9db850082
7 changed files with 15 additions and 15 deletions

View file

@ -99,8 +99,8 @@ GEM
rspec-core (2.13.1) rspec-core (2.13.1)
rspec-expectations (2.13.0) rspec-expectations (2.13.0)
diff-lcs (>= 1.1.3, < 2.0) diff-lcs (>= 1.1.3, < 2.0)
rspec-mocks (2.13.0) rspec-mocks (2.13.1)
rspec-rails (2.13.0) rspec-rails (2.13.2)
actionpack (>= 3.0) actionpack (>= 3.0)
activesupport (>= 3.0) activesupport (>= 3.0)
railties (>= 3.0) railties (>= 3.0)
@ -136,7 +136,7 @@ DEPENDENCIES
jruby-openssl jruby-openssl
rails (~> 3.0) rails (~> 3.0)
rake (>= 0.9.2) rake (>= 0.9.2)
rspec-rails (~> 2.13) rspec-rails (>= 2.13.1, < 3)
shoulda-context (~> 1.1.2) shoulda-context (~> 1.1.2)
shoulda-matchers! shoulda-matchers!
sqlite3 sqlite3

View file

@ -96,8 +96,8 @@ GEM
rspec-core (2.13.1) rspec-core (2.13.1)
rspec-expectations (2.13.0) rspec-expectations (2.13.0)
diff-lcs (>= 1.1.3, < 2.0) diff-lcs (>= 1.1.3, < 2.0)
rspec-mocks (2.13.0) rspec-mocks (2.13.1)
rspec-rails (2.13.0) rspec-rails (2.13.2)
actionpack (>= 3.0) actionpack (>= 3.0)
activesupport (>= 3.0) activesupport (>= 3.0)
railties (>= 3.0) railties (>= 3.0)
@ -131,7 +131,7 @@ DEPENDENCIES
jruby-openssl jruby-openssl
rails (~> 3.0.17) rails (~> 3.0.17)
rake (>= 0.9.2) rake (>= 0.9.2)
rspec-rails (~> 2.13) rspec-rails (>= 2.13.1, < 3)
shoulda-context (~> 1.1.2) shoulda-context (~> 1.1.2)
shoulda-matchers! shoulda-matchers!
sqlite3 sqlite3

View file

@ -104,8 +104,8 @@ GEM
rspec-core (2.13.1) rspec-core (2.13.1)
rspec-expectations (2.13.0) rspec-expectations (2.13.0)
diff-lcs (>= 1.1.3, < 2.0) diff-lcs (>= 1.1.3, < 2.0)
rspec-mocks (2.13.0) rspec-mocks (2.13.1)
rspec-rails (2.13.0) rspec-rails (2.13.2)
actionpack (>= 3.0) actionpack (>= 3.0)
activesupport (>= 3.0) activesupport (>= 3.0)
railties (>= 3.0) railties (>= 3.0)
@ -151,7 +151,7 @@ DEPENDENCIES
jruby-openssl jruby-openssl
rails (~> 3.1.8) rails (~> 3.1.8)
rake (>= 0.9.2) rake (>= 0.9.2)
rspec-rails (~> 2.13) rspec-rails (>= 2.13.1, < 3)
sass-rails sass-rails
shoulda-context (~> 1.1.2) shoulda-context (~> 1.1.2)
shoulda-matchers! shoulda-matchers!

View file

@ -102,8 +102,8 @@ GEM
rspec-core (2.13.1) rspec-core (2.13.1)
rspec-expectations (2.13.0) rspec-expectations (2.13.0)
diff-lcs (>= 1.1.3, < 2.0) diff-lcs (>= 1.1.3, < 2.0)
rspec-mocks (2.13.0) rspec-mocks (2.13.1)
rspec-rails (2.13.0) rspec-rails (2.13.2)
actionpack (>= 3.0) actionpack (>= 3.0)
activesupport (>= 3.0) activesupport (>= 3.0)
railties (>= 3.0) railties (>= 3.0)
@ -149,7 +149,7 @@ DEPENDENCIES
jruby-openssl jruby-openssl
rails (~> 3.2.13) rails (~> 3.2.13)
rake (>= 0.9.2) rake (>= 0.9.2)
rspec-rails (~> 2.13) rspec-rails (>= 2.13.1, < 3)
sass-rails sass-rails
shoulda-context (~> 1.1.2) shoulda-context (~> 1.1.2)
shoulda-matchers! shoulda-matchers!

View file

@ -144,7 +144,7 @@ DEPENDENCIES
protected_attributes protected_attributes
rails (= 4.0.0) rails (= 4.0.0)
rake (>= 0.9.2) rake (>= 0.9.2)
rspec-rails (~> 2.13) rspec-rails (>= 2.13.1, < 3)
sass-rails (~> 4.0.0) sass-rails (~> 4.0.0)
shoulda-context (~> 1.1.2) shoulda-context (~> 1.1.2)
shoulda-matchers! shoulda-matchers!

View file

@ -28,5 +28,5 @@ Gem::Specification.new do |s|
s.add_development_dependency('cucumber', '~> 1.1') s.add_development_dependency('cucumber', '~> 1.1')
s.add_development_dependency('rails', '~> 3.0') s.add_development_dependency('rails', '~> 3.0')
s.add_development_dependency('rake', '>= 0.9.2') s.add_development_dependency('rake', '>= 0.9.2')
s.add_development_dependency('rspec-rails', '~> 2.13') s.add_development_dependency('rspec-rails', '>= 2.13.1', '< 3')
end end

View file

@ -1,6 +1,6 @@
require 'spec_helper' require 'spec_helper'
describe Shoulda::Matchers::ActionController::RouteMatcher do describe Shoulda::Matchers::ActionController::RouteMatcher, type: :controller do
context 'given a controller with a defined glob url' do context 'given a controller with a defined glob url' do
it 'accepts glob route' do it 'accepts glob route' do
controller = define_controller('Examples').new controller = define_controller('Examples').new