Sha256: d585fbf21380e22379e78ec3523d57e0883fafbec0d2fd59531e2f20376806b0

Contents?: true

Size: 349 Bytes

Versions: 12

Compression:

Stored size: 349 Bytes

Contents

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

12 entries across 12 versions & 3 rubygems

Version Path
wisper-rspec-compat-2.1.0 lib/wisper/rspec/stub_wisper_publisher.rb
wisper-rspec-compat-2.0.0 lib/wisper/rspec/stub_wisper_publisher.rb
wisper-rspec-1.1.0 lib/wisper/rspec/stub_wisper_publisher.rb
wisper-rspec-1.0.1 lib/wisper/rspec/stub_wisper_publisher.rb
wisper-rspec-1.0.0 lib/wisper/rspec/stub_wisper_publisher.rb
wisper-rspec-0.0.3 lib/wisper/rspec/stub_wisper_publisher.rb
wisper-1.6.1 lib/wisper/rspec/stub_wisper_publisher.rb
wisper-rspec-0.0.2 lib/wisper/rspec/stub_wisper_publisher.rb
wisper-rspec-0.0.1 lib/wisper/rspec/stub_wisper_publisher.rb
wisper-1.6.0 lib/wisper/rspec/stub_wisper_publisher.rb
wisper-1.5.0 lib/wisper/rspec/stub_wisper_publisher.rb
wisper-1.4.0 lib/wisper/rspec/stub_wisper_publisher.rb