File tree Expand file tree Collapse file tree 4 files changed +6
-3
lines changed Expand file tree Collapse file tree 4 files changed +6
-3
lines changed Original file line number Diff line number Diff line change @@ -10,6 +10,9 @@ Bug fixes
10
10
11
11
* Fixes "warning: instance variable @orig \_ routes not initialized" raised by
12
12
controller specs when ` --warnings ` are enabled. (Andy Lindeman)
13
+ * Where possible, check against the version of ActiveRecord, rather than
14
+ Rails. It is possible to use some of rspec-rails without all of Rails.
15
+ (Darryl Pogue)
13
16
14
17
### 2.14.0 / 2013-07-06
15
18
[ full changelog] ( http://github.com/rspec/rspec-rails/compare/v2.14.0.rc1...v2.14.0 )
Original file line number Diff line number Diff line change @@ -10,7 +10,7 @@ Feature: errors_on
10
10
validates_presence_of :name
11
11
12
12
# In Rails 4, mass assignment protection is implemented on controllers
13
- attr_accessible :name if ::Rails ::VERSION::STRING < '4'
13
+ attr_accessible :name if ::ActiveRecord ::VERSION::STRING < '4'
14
14
15
15
validates_length_of :name, :minimum => 10, :on => :publication
16
16
end
Original file line number Diff line number Diff line change @@ -10,7 +10,7 @@ module ActiveRecord
10
10
# ModelClass.should have(:no).records
11
11
# ModelClass.should have(1).record
12
12
# ModelClass.should have(n).records
13
- if ::Rails ::VERSION ::STRING >= '4'
13
+ if ::ActiveRecord ::VERSION ::STRING >= '4'
14
14
def records
15
15
all . to_a
16
16
end
Original file line number Diff line number Diff line change @@ -4,7 +4,7 @@ module Rails
4
4
module FixtureSupport
5
5
extend ActiveSupport ::Concern
6
6
include RSpec ::Rails ::SetupAndTeardownAdapter
7
- include RSpec ::Rails ::MiniTestLifecycleAdapter if ::Rails ::VERSION ::STRING > '4'
7
+ include RSpec ::Rails ::MiniTestLifecycleAdapter if ::ActiveRecord ::VERSION ::STRING > '4'
8
8
include RSpec ::Rails ::TestUnitAssertionAdapter
9
9
include ActiveRecord ::TestFixtures
10
10
You can’t perform that action at this time.
0 commit comments