Sha256: 473737bde62e03788a67aefff86e2f7bcd27b44b38301460a411d4b73ae5ac45

Contents?: true

Size: 735 Bytes

Versions: 4

Compression:

Stored size: 735 Bytes

Contents

require 'helper'

describe Wayback::Archive do

  describe "#==" do
    it "returns true when objects IDs are the same" do
      saved_search = Wayback::Archive.new(:id => 1, :name => "foo")
      other = Wayback::Archive.new(:id => 1, :name => "bar")
      expect(saved_search == other).to be_true
    end
    it "returns false when objects IDs are different" do
      saved_search = Wayback::Archive.new(:id => 1)
      other = Wayback::Archive.new(:id => 2)
      expect(saved_search == other).to be_false
    end
    it "returns false when classes are different" do
      saved_search = Wayback::Archive.new(:id => 1)
      other = Wayback::Identity.new(:id => 1)
      expect(saved_search == other).to be_false
    end
  end

end

Version data entries

4 entries across 4 versions & 1 rubygems

Version Path
wayback-0.3.1 spec/wayback/archive_spec.rb
wayback-0.2.1 spec/wayback/archive_spec.rb
wayback-0.2.0 spec/wayback/archive_spec.rb
wayback-0.1.0 spec/wayback/archive_spec.rb