Skip to content

Instantly share code, notes, and snippets.

@queirozfcom
Last active August 29, 2015 14:04
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save queirozfcom/517c207b333d154d2b11 to your computer and use it in GitHub Desktop.
Save queirozfcom/517c207b333d154d2b11 to your computer and use it in GitHub Desktop.
before(:each) do
# doesn't work for what I need.
# allow_any_instance_of(Edge).to receive(:freeze).and_return(nil)
@c = Converter.new name: 'c'
@edge_in = instance_double(Edge, from: double(), to: @c, freeze: nil)
@edge_out = instance_double(Edge, from: @c, to: double(), freeze: nil)
@c.attach_edge!(@edge_in).attach_edge!(@edge_out)
end
it 'pings incoming nodes' do
expect(@edge_in).to receive(:test_ping?)
@edge_out.as_null_object
@c.trigger!
end
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment