Permalink
Browse files

change lambda to expect

  • Loading branch information...
1 parent 650bb43 commit 38d3df3381eb2a05c4878f436ba97cf3eeac21f2 @despo committed May 9, 2012
Showing with 6 additions and 6 deletions.
  1. +6 −6 spec/active_record/active_record_spec.rb
@@ -125,9 +125,9 @@
it "should initialize using parameter hash with string keys" do
yellow_car = RaceCar.new({'name'=>'FastFurious',
- 'gear'=>'second',
- 'lights'=>'on',
- 'choke'=>'medium'})
+ 'gear'=>'second',
+ 'lights'=>'on',
+ 'choke'=>'medium'})
yellow_car.gear.should == :second
yellow_car.lights.should == 'on'
yellow_car.choke.should == :medium
@@ -158,11 +158,11 @@
end
it "should not raise InvalidEnumeration when parametrically initialized with invalid column attribute value" do
- lambda{ red_car.gear= :drive}.should_not raise_error(EnumeratedAttribute::InvalidEnumeration)
+ expect{ red_car.gear = :drive}.should_not raise_error(EnumeratedAttribute::InvalidEnumeration)
end
it "should raise RecordInvalid on create! when parametrically initialized with invalid column attribute value" do
- lambda{ RaceCar.create!(:gear => :drive)}.should raise_error(ActiveRecord::RecordInvalid)
+ expect{ RaceCar.create!(:gear => :drive)}.should raise_error(ActiveRecord::RecordInvalid)
end
@@ -316,7 +316,7 @@
end
it "should save and retrieve its name" do
- red_car.name= 'Green Meanie'
+ red_car.name = 'Green Meanie'
red_car.save!
blue_car = RaceCar.find red_car.id

0 comments on commit 38d3df3

Please sign in to comment.