Sha256: 896c7f13f5614b039ca0e85155592f0b722c39fe6d7492114c89f46ab1d5f66f
Contents?: true
Size: 857 Bytes
Versions: 3
Compression:
Stored size: 857 Bytes
Contents
require File.dirname(__FILE__) + '/../../test_helper' class CommentableModelTest < ActiveSupport::TestCase def setup super @commentable = Content.new end test "has many comments" do @commentable.should have_many(:comments) end test "has many approved_comments" do @commentable.should have_many(:approved_comments) end test "has many unapproved_comments" do @commentable.should have_many(:unapproved_comments) end # FIXME how to specify this? # test 'comments.by_author is a shortcut to find_all_by_author_id_and_author_type' do # mock(@commentable.comments).find_all_by_author_id_and_author_type # @commentable.comments.by_author(User.new) # end # FIXME # test '#approved_comments_count returns the number of the approved comments' # TODO and it really should be implemented as a Counter ... end
Version data entries
3 entries across 3 versions & 2 rubygems
Version | Path |
---|---|
adva_comments-0.2.0 | test/unit/models/commentable_test.rb |
adva_comments-0.1.0 | test/unit/models/commentable_test.rb |
adva-0.0.1 | adva_comments/test/unit/models/commentable_test.rb |