Sha256: 51d26b778f23712819f1d987eb1d5f6ade854e79a6fa1784c6f4af56854706e0
Contents?: true
Size: 849 Bytes
Versions: 9
Compression:
Stored size: 849 Bytes
Contents
require 'spec/spec_helper' # # Tests for shop order page model extensions # describe Shop::Models::Page do dataset :pages, :shop_categories, :shop_products before :each do @page = pages(:home) end context 'relationships' do describe 'belongs_to :shop_category' do it 'should accept and return a shop_category object' do @shop_category = shop_categories(:bread) @page.shop_category = @shop_category @page.shop_category.should === @shop_category end end describe 'belongs_to :shop_product' do it 'should accept and return a shop_product object' do @shop_product = shop_products(:warm_bread) @page.shop_product = @shop_product @page.shop_product.should === @shop_product end end end end
Version data entries
9 entries across 9 versions & 1 rubygems