Sha256: 3638cf289c24b9d739728f048f5776325c24b0de146debef338dd61f2b2aaac1
Contents?: true
Size: 681 Bytes
Versions: 14
Compression:
Stored size: 681 Bytes
Contents
require File.dirname(__FILE__) + '/../spec_helper' describe Highrise::User do before(:each) do @user = Highrise::User.new end it "should be instance of Highrise::Base" do @user.kind_of?(Highrise::Base).should be_true end def join(group) Membership.create(:user_id => id, :group_id => group.id) end describe ".joind" do it "should delegate to Highrise::Membership.create" do group_mock = mock("group") group_mock.should_receive(:id).and_return(2) @user.should_receive(:id).and_return(1) Highrise::Membership.should_receive(:create).with({:user_id=>1, :group_id=>2}) @user.join(group_mock) end end end
Version data entries
14 entries across 14 versions & 3 rubygems