Permalink
Browse files

scope a spec to AR version

  • Loading branch information...
1 parent 84316bc commit 3f4615e053a43e7b334d303126007594256f31cf @adzap committed Feb 1, 2012
Showing with 8 additions and 1 deletion.
  1. +7 −0 spec/spec_helper.rb
  2. +1 −1 spec/validates_timeliness/orm/active_record_spec.rb
View
@@ -91,4 +91,11 @@ def birth_date=(value)
reset_validation_setup_for(Person)
reset_validation_setup_for(PersonWithShim)
end
+
+ RSpec.configure do |c|
+ c.filter_run_excluding :active_record => lambda {|version|
+ !(::ActiveRecord::VERSION::STRING.to_s =~ /^#{version.to_s}/)
+ }
+ end
+
end
@@ -47,7 +47,7 @@ class EmployeeWithParser < ActiveRecord::Base
r.birth_date = '2010-01-01'
end
- context "for a date column" do
+ context "for a date column", :active_record => '3.0' do
it 'should store a date value after parsing string' do
r = EmployeeWithParser.new
r.birth_date = '2010-01-01'

0 comments on commit 3f4615e

Please sign in to comment.