Created
February 24, 2010 08:46
-
-
Save iamteem/313256 to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
describe Item, 'with price_in_dollars of 1500' do | |
let(:item) { Item.new(:price_in_dollars => 1500) } | |
it 'should assign 1500_00 to the real price' do | |
item.price.should == 1500_00 | |
end | |
end | |
describe Item, 'with price_in_dollars of FooBar' do | |
subject { Item.new(:price_in_dollars => 'FooBar') } | |
it "should store the invalid value 'FooBar' as it's price in dollars" do | |
subject.price_in_dollars.should == 'FooBar' | |
end | |
end |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment