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



9
10
11
12
13
14
15
# File 'lib/wisper/rspec/stub_wisper_publisher.rb', line 9

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
      publish(event_to_publish, *published_event_args)
    end
  end)
end