Sha256: fb45946696f205d246dcfcef633d9bba7c78f4f03d374df72f70ea37c671ebd8
Contents?: true
Size: 498 Bytes
Versions: 1
Compression:
Stored size: 498 Bytes
Contents
shared_examples_for 'repositories' do |model_class| describe '#save' do context "new #{model_class}" do let( :repository ){ described_class.new } let( :model ){ model_class.new( unsaved: false ) } before do # Should not make an API request in test! expect( repository ).not_to receive( :save_new ) expect( repository ).not_to receive( :update_existing ) end specify{ expect( repository.save( model )).to eql( true ) } end end end
Version data entries
1 entries across 1 versions & 1 rubygems
Version | Path |
---|---|
fortnox-api-0.1.0 | spec/fortnox/api/repositories/examples.rb |