spec/unit/axiom/relation/gateway/rename_spec.rb in axiom-do-adapter-0.1.0 vs spec/unit/axiom/relation/gateway/rename_spec.rb in axiom-do-adapter-0.2.0

- old
+ new

@@ -4,18 +4,18 @@ require 'axiom/relation/gateway' describe Relation::Gateway, '#rename' do subject { object.rename(args) } - let(:adapter) { mock('Adapter') } - let(:relation) { mock('Relation', :rename => response) } - let(:response) { mock('New Relation', :kind_of? => true) } - let!(:object) { described_class.new(adapter, relation) } - let(:args) { stub } + let(:adapter) { double('Adapter') } + let(:relation) { double('Relation', rename: response) } + let(:response) { double('New Relation', :kind_of? => true) } + let!(:object) { described_class.new(adapter, relation) } + let(:args) { double } it_should_behave_like 'a unary relation method' it 'forwards the arguments to relation#rename' do - relation.should_receive(:rename).with(args) + expect(relation).to receive(:rename).with(args) subject end end