Sha256: 01c1ef79106754d93d7237e0ea8a7d8f4a8ce4780aff27cc8056d3efbcd6163c

Contents?: true

Size: 732 Bytes

Versions: 2

Compression:

Stored size: 732 Bytes

Contents

require 'spec_helper'

describe Bogus::InvocationMatcher do
  let(:object) { stub }
  let(:method) { nil }
  let(:records_double_interactions) { stub }
  let(:verifies_stub_definition) { stub }

  let(:invocation_matcher) { isolate(Bogus::InvocationMatcher) }

  before do
    stub(verifies_stub_definition).verify!
    stub(records_double_interactions).record

    invocation_matcher.the_method(:foo, :bar)
    invocation_matcher.matches?(object)
  end

  it "verifies stub definition" do
    verifies_stub_definition.should have_received.verify!(object, :the_method, [:foo, :bar])
  end

  it "records double interacions" do
    records_double_interactions.should have_received.record(object, :the_method, [:foo, :bar])
  end
end

Version data entries

2 entries across 2 versions & 1 rubygems

Version Path
bogus-0.0.2 spec/bogus/invocation_matcher_spec.rb
bogus-0.0.1 spec/bogus/invocation_matcher_spec.rb