Skip to content

Commit

Permalink
change lambda to expect
Browse files Browse the repository at this point in the history
  • Loading branch information
despo committed May 9, 2012
1 parent 650bb43 commit 38d3df3
Showing 1 changed file with 6 additions and 6 deletions.
12 changes: 6 additions & 6 deletions spec/active_record/active_record_spec.rb
Expand Up @@ -125,9 +125,9 @@


it "should initialize using parameter hash with string keys" do it "should initialize using parameter hash with string keys" do
yellow_car = RaceCar.new({'name'=>'FastFurious', yellow_car = RaceCar.new({'name'=>'FastFurious',
'gear'=>'second', 'gear'=>'second',
'lights'=>'on', 'lights'=>'on',
'choke'=>'medium'}) 'choke'=>'medium'})
yellow_car.gear.should == :second yellow_car.gear.should == :second
yellow_car.lights.should == 'on' yellow_car.lights.should == 'on'
yellow_car.choke.should == :medium yellow_car.choke.should == :medium
Expand Down Expand Up @@ -158,11 +158,11 @@
end end


it "should not raise InvalidEnumeration when parametrically initialized with invalid column attribute value" do 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 end


it "should raise RecordInvalid on create! when parametrically initialized with invalid column attribute value" do 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 end




Expand Down Expand Up @@ -316,7 +316,7 @@
end end


it "should save and retrieve its name" do it "should save and retrieve its name" do
red_car.name= 'Green Meanie' red_car.name = 'Green Meanie'
red_car.save! red_car.save!


blue_car = RaceCar.find red_car.id blue_car = RaceCar.find red_car.id
Expand Down

0 comments on commit 38d3df3

Please sign in to comment.