Skip to content

Instantly share code, notes, and snippets.

@mattpodwysocki
Created February 11, 2014 19: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 mattpodwysocki/8941727 to your computer and use it in GitHub Desktop.
Save mattpodwysocki/8941727 to your computer and use it in GitHub Desktop.
def test_defer_raise
scheduler = RX::TestScheduler.new
invoked = 0
err = 'foo'
res = scheduler.configure do
RX::Observable.defer do
invoked += 1
raise err
end
end
puts res.messages.to_s
msgs = [on_error(200, err)]
assert_messages msgs, res.messages
assert_equal 1, invoked
end
[#<struct RX::Recorded time=200, value=on_error(private method `raise' called for Module:Class)>]
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment