Created
July 8, 2014 02:31
-
-
Save queirozfcom/19beb0ee49c469cd8837 to your computer and use it in GitHub Desktop.
Take an already instantiated obj and make it a null_object for the duration of a single test
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
describe '#put_resource!' do | |
before(:each) do | |
@c = Converter.new name: 'c' | |
@edge_in = double(from: double(), to: @c) | |
@edge_out = double(from: @c, to: double()) | |
@c.attach_edge!(@edge_out).attach_edge!(@edge_in) | |
end | |
it 'does not ping incoming edges' do | |
expect(@edge_in).not_to receive(:test_ping?) | |
@edge_out.as_null_object | |
@c.put_resource!(double()) | |
end |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment