Sha256: 57d56dbd2e5f36faa2594d96161e96bea6c84123a1dd1279cdc1b97794a36693
Contents?: true
Size: 702 Bytes
Versions: 52
Compression:
Stored size: 702 Bytes
Contents
require File.expand_path(File.dirname(__FILE__) + '/../spec_helper') describe VendorDocument do describe "incrementing kid_mult for new document" do it "should increment kid_mult" do @doc = OpenStruct.new(:kid_mult=>0) mock(VendorDocument).filter(:kid_date=>Date.today.to_fos_days, :kid_time=>Time.now.as_minutes) {mock!.order(:kid_mult) {[@doc]}} VendorDocument.new.kid_mult.should==1 end it "should increment kid_mult" do @doc = OpenStruct.new(:kid_mult=>255) mock(VendorDocument).filter(:kid_date=>Date.today.to_fos_days, :kid_time=>Time.now.as_minutes) {mock!.order(:kid_mult) {[@doc]}} VendorDocument.new.kid_mult.should==0 end end end
Version data entries
52 entries across 52 versions & 1 rubygems