Sha256: b743be7f6a8a465ecde9efe675e66d8871294c9d9ed2cc9219265069b4f82534
Contents?: true
Size: 1.19 KB
Versions: 1
Compression:
Stored size: 1.19 KB
Contents
require File.expand_path(File.dirname(__FILE__))+'/../test_helper' class FollowableTest < Test::Unit::TestCase context "Followable" do setup do @follower = ImAFollower.new @followable = ImAFollowable.create end context "#is_followable" do should "return true" do assert_true @followable.is_followable? end end context "#followed_by?" do should "not accept non-followers" do assert_raise(ArgumentError) { @followable.followed_by?(:foo) } end should "call $Follow.follows?" do $Follow.expects(:follows?).with(@follower, @followable).once @followable.followed_by?(@follower) end end context "#followers" do should "call $Follow.followers" do $Follow.expects(:followers).with(@followable, @follower.class, { :foo => :bar }) @followable.followers(@follower.class, { :foo => :bar }) end end context "#followers_relation" do should "call $Follow.followers_relation" do $Follow.expects(:followers_relation).with(@followable, @follower.class, { :foo => :bar }) @followable.followers_relation(@follower.class, { :foo => :bar }) end end end end
Version data entries
1 entries across 1 versions & 1 rubygems
Version | Path |
---|---|
socialization-0.5.0.beta2 | test/victims/followable_test.rb |