Top Level Namespace

Defined Under Namespace

Modules: Wisper Classes: TestWisperPublisher

Instance Method Summary collapse

Instance Method Details

#stub_wisper_publisher(clazz, called_method, event_to_publish, *published_event_args) ⇒ Object


6
7
8
9
10
11
12
# File 'lib/wisper/rspec/stub_wisper_publisher.rb', line 6

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