Fix a few missed renames
[merb_mart.git] / spec / models / item / line_item_spec.rb
blob6d2818e94c31ce8458722d22de769a2f83612a2e
1 require File.join( File.dirname(__FILE__), "..", "..", "spec_helper" )
3 describe LineItem do
4   before(:each) do
5     DataMapper.auto_migrate!
6   end
8   it "should require a unit_price & quantity" do
9     li = LineItem.create(LineItem.gen_attrs.except(:unit_price))
10     li.should_not be_valid
11     li.errors.should include(:unit_price)
13     li = LineItem.create(LineItem.gen_attrs.except(:quantity))
14     li.should_not be_valid
15     li.errors.should include(:quantity)
16   end
17 end