Sha256: b870a1059e28dd0159cf1d72617d7a5813b9a5fd41b44d59cdf02f8ff37fa0d5

Contents?: true

Size: 863 Bytes

Versions: 1

Compression:

Stored size: 863 Bytes

Contents

module SimplyCommentable::Assertions
	def self.included(base)
		base.extend(ClassMethods)
	end
	module ClassMethods
		def assert_simply_commentable
#			assert_should_have_many :comments, :polymorphic => true
			test "should be simply commentable" do
				assert model_name.constantize.new.respond_to?(:comments)
#				self.class.assert_should_have_many :comments, :polymorphic => true
			end
		end
		def assert_simply_commentable_commenter
#			assert_should_have_many :comments, :polymorphic => true
			test "should be simply commentable commenter" do
				assert model_name.constantize.new.respond_to?(:comments)
#				self.class.assert_should_have_many :comments, :polymorphic => true
			end
		end
	end
	module InstanceMethods
	end
end
require 'active_support'
require 'active_support/test_case'
ActiveSupport::TestCase.send(:include,SimplyCommentable::Assertions)

Version data entries

1 entries across 1 versions & 1 rubygems

Version Path
jakewendt-simply_commentable-0.2.1 lib/simply_commentable/assertions.rb