Sha256: f675290e19e87ab1d2f454a3a546a760144d5f43db87aca1a52e5c8fe0ef5380
Contents?: true
Size: 684 Bytes
Versions: 7
Compression:
Stored size: 684 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
7 entries across 7 versions & 3 rubygems