Sha256: 6ae15c47c251710433652f3331849e47bc3e32757727fa2ae5189b8820f3e7c3
Contents?: true
Size: 1.14 KB
Versions: 13
Compression:
Stored size: 1.14 KB
Contents
require "spec_helper" describe Arrthorizer::Context do let(:context_hash) { { some_key: 'some_value' } } let(:context) { Arrthorizer::Context.new(context_hash) } describe :== do context "when an Arrthorizer::Context is provided" do context "and that context has the same contents" do let(:other) { Arrthorizer::Context.new(context_hash) } it "returns true" do expect(context).to eq(other) end end context "but that context has different contents" do let(:other) { Arrthorizer::Context.new(some_key: 'other_value') } it "returns false" do expect(context).not_to eq(other) end end end context "when a hashlike object is provided" do context "and that object has the same contents" do let(:other) { context_hash.dup } it "returns true" do expect(context).to eq(other) end end context "but that object has different contents" do let(:other) { { some_key: 'some_other_value' } } it "returns false" do expect(context).not_to eq(other) end end end end end
Version data entries
13 entries across 13 versions & 1 rubygems