Sha256: 52ec7b9d123a3471d31f5bafb5e98dbe264dc99bf9d3c3f7f0bf7bc835df2963

Contents?: true

Size: 502 Bytes

Versions: 2

Compression:

Stored size: 502 Bytes

Contents

require 'spec_helper'
module Domain
  describe Scalar, "hash" do

    let(:point){ Point.new(1, 2) }

    subject{ point.hash }

    context 'on an equivalent point, same class' do
      let(:other){ Point.new(1, 2) }

      specify{
        point.hash.should eq(other.hash)
      }
    end

    context 'on an equivalent point, subclass' do
      let(:sub)  { Class.new(Point) }
      let(:other){ sub.new(1, 2)    }

      specify{
        point.hash.should eq(other.hash)
      }
    end

  end
end

Version data entries

2 entries across 2 versions & 1 rubygems

Version Path
domain-1.0.0 spec/factory/scalar_domain/test_hash.rb
domain-1.0.0.rc4 spec/factory/scalar_domain/test_hash.rb