Sha256: 9111904db6e2ce5f0b70c2ff7148475a5b5826bb645b6736fd635cc6d783129b
Contents?: true
Size: 489 Bytes
Versions: 1
Compression:
Stored size: 489 Bytes
Contents
### Wisper Stubbing # This is a proposal for integration as part of wisper core # for testing: https://github.com/krisleech/wisper/issues/1 class TestWisperPublisher include Wisper::Publisher def initialize(*args); end end def stub_wisper_publisher(clazz, called_method, event_to_publish, *published_event_args) stub_const(clazz, Class.new(TestWisperPublisher) do define_method(called_method) do |*args| publish(event_to_publish, *published_event_args) end end) end
Version data entries
1 entries across 1 versions & 1 rubygems
Version | Path |
---|---|
wisper-1.3.0 | lib/wisper/rspec/stub_wisper_publisher.rb |