Sha256: 870c8b941a59fba5db4460e5982d535ad2ea4641adad8dd3b1e04b392ef28280
Contents?: true
Size: 560 Bytes
Versions: 1
Compression:
Stored size: 560 Bytes
Contents
require File.dirname(__FILE__) + '/../spec_helper' describe User do describe "A user that can share" do before do @user = Factory(:user) @share = @user.shares.build(Factory.attributes_for(:share)) @share.save! end it { should have_many :shares } it "should add shares to the user" do @user.shares.length.should == 1 end # TODO can add the count cache later on if we need it # it "should have share cache" do # @user.reload # @user.share_count.should == 1 # end end end
Version data entries
1 entries across 1 versions & 1 rubygems
Version | Path |
---|---|
muck-shares-3.0.0 | test/rails_test/spec/models/user_spec.rb |