Sha256: 7c2a078d901094e86e45ecfc10faacb48901f092f22135e72740f7df6d02e834

Contents?: true

Size: 625 Bytes

Versions: 2

Compression:

Stored size: 625 Bytes

Contents

require 'spec_helper'

describe Bogus::RecordInteractions do

  class SampleRecordsInteractions
    include Bogus::RecordInteractions
  end

  let(:sample) { SampleRecordsInteractions.new }
  let!(:rr) { Bogus::RRProxy }

  it "allows verifying that interactions happened" do
    sample.__record__(:foo, 1, 2, 3)

    sample.__inner_object__.should have_received.foo(1, 2, 3)
  end

  it "allows verifying that interactions didn't happen" do
    sample.__record__(:bar)

    sample.__inner_object__.should_not have_received.foo
  end

  it "returns self from record" do
    sample.__record__(:foo).should == sample
  end
end

Version data entries

2 entries across 2 versions & 1 rubygems

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