Skip to content

Commit

Permalink
Tighten up instance/object doubles in Persistable
Browse files Browse the repository at this point in the history
  • Loading branch information
Tom Johnson committed Jun 5, 2015
1 parent b75e7ee commit d8d098f
Showing 1 changed file with 5 additions and 2 deletions.
7 changes: 5 additions & 2 deletions spec/active_triples/persistable_spec.rb
Original file line number Diff line number Diff line change
Expand Up @@ -13,8 +13,11 @@

describe 'method delegation' do
context 'with a strategy' do
let(:strategy_class) { double('strategy class') }
let(:strategy) { double('persistence strategy') }
let(:strategy_class) do
object_double(ActiveTriples::ParentStrategy).as_stubbed_const
end

let(:strategy) { instance_double('PersistenceStrategy') }

before do
allow(strategy_class).to receive(:new).and_return(strategy)
Expand Down

0 comments on commit d8d098f

Please sign in to comment.