Skip to content

Instantly share code, notes, and snippets.

@iamteem
Created February 24, 2010 08:46
Show Gist options
  • Save iamteem/313256 to your computer and use it in GitHub Desktop.
Save iamteem/313256 to your computer and use it in GitHub Desktop.
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