1 require File.join( File.dirname(__FILE__), "..", "..", "spec_helper" )
5 DataMapper.auto_migrate!
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)