Sha256: a375927c148a523cb6d4f1070f1a0bb458cc1e585df445bcaee387c9b6577e26

Contents?: true

Size: 571 Bytes

Versions: 3

Compression:

Stored size: 571 Bytes

Contents

require 'spec_helper'

describe Bogus::TracksExistenceOfTestDoubles do
  let(:tracker) { Bogus::TracksExistenceOfTestDoubles.new }

  it "returns an empty double list with nothing tracked" do
    expect(tracker.doubles).to eq([])
  end

  it "lists the added test doubles in order without duplicates" do
    foo = "foo"
    bar = 1
    baz = Object.new

    tracker.track foo
    tracker.track bar
    tracker.track foo
    tracker.track baz
    tracker.track baz
    tracker.track bar
    tracker.track foo


    expect(tracker.doubles).to eq([foo, bar, baz])
  end
end

Version data entries

3 entries across 3 versions & 1 rubygems

Version Path
bogus-0.1.7 spec/bogus/stubbing/tracks_existence_of_test_doubles_spec.rb
bogus-0.1.6 spec/bogus/stubbing/tracks_existence_of_test_doubles_spec.rb
bogus-0.1.5 spec/bogus/stubbing/tracks_existence_of_test_doubles_spec.rb