21 lines
469 B
Ruby
21 lines
469 B
Ruby
require 'spec_helper'
|
|
|
|
describe ClientContext do
|
|
|
|
let(:client) {
|
|
fake_client = double(Object)
|
|
fake_client.should_receive(:context=).any_number_of_times
|
|
fake_client.should_receive(:context).any_number_of_times
|
|
fake_client
|
|
}
|
|
let(:context) {ClientContext.new({}, client, "client")}
|
|
|
|
describe 'hashing' do
|
|
it "hash correctly" do
|
|
set = Set.new
|
|
set.add?(context).should eql(set)
|
|
set.add?(context).should be_nil
|
|
end
|
|
end
|
|
end
|