scope a spec to AR version

This commit is contained in:
Adam Meehan 2012-02-01 21:25:05 +11:00
parent 84316bc73a
commit 3f4615e053
2 changed files with 8 additions and 1 deletions

View File

@ -91,4 +91,11 @@ RSpec.configure do |c|
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

View File

@ -47,7 +47,7 @@ describe ValidatesTimeliness, 'ActiveRecord' do
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'