Permalink
Browse files

Merge branch 'dpogue-rails-deps'

[Closes #805]
[Refs #804]
  • Loading branch information...
2 parents 9764f3d + 4babeed commit 710fb6778f85ab83b7f8fe194de0d1d87a791038 @alindeman alindeman committed Aug 10, 2013
View
@@ -10,6 +10,9 @@ Bug fixes
* Fixes "warning: instance variable @orig\_routes not initialized" raised by
controller specs when `--warnings` are enabled. (Andy Lindeman)
+* Where possible, check against the version of ActiveRecord, rather than
+ Rails. It is possible to use some of rspec-rails without all of Rails.
+ (Darryl Pogue)
### 2.14.0 / 2013-07-06
[full changelog](http://github.com/rspec/rspec-rails/compare/v2.14.0.rc1...v2.14.0)
@@ -10,7 +10,7 @@ Feature: errors_on
validates_presence_of :name
# In Rails 4, mass assignment protection is implemented on controllers
- attr_accessible :name if ::Rails::VERSION::STRING < '4'
+ attr_accessible :name if ::ActiveRecord::VERSION::STRING < '4'
validates_length_of :name, :minimum => 10, :on => :publication
end
@@ -10,7 +10,7 @@ module ActiveRecord
# ModelClass.should have(:no).records
# ModelClass.should have(1).record
# ModelClass.should have(n).records
- if ::Rails::VERSION::STRING >= '4'
+ if ::ActiveRecord::VERSION::STRING >= '4'
def records
all.to_a
end
@@ -4,7 +4,7 @@ module Rails
module FixtureSupport
extend ActiveSupport::Concern
include RSpec::Rails::SetupAndTeardownAdapter
- include RSpec::Rails::MiniTestLifecycleAdapter if ::Rails::VERSION::STRING > '4'
+ include RSpec::Rails::MiniTestLifecycleAdapter if ::ActiveRecord::VERSION::STRING > '4'
include RSpec::Rails::TestUnitAssertionAdapter
include ActiveRecord::TestFixtures

0 comments on commit 710fb67

Please sign in to comment.