ref: master
test/unit/activity_presenter/generic.rb
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 |
require_relative "../../test_helper" class ActivityPresenter::GenericTest < ActiveSupport::TestCase should 'accept everything' do activity = ActionTracker::Record.new activity.stubs(:target).returns(Profile.new) assert ActivityPresenter::Generic.accepts?(activity) activity.stubs(:target).returns(Article.new) assert ActivityPresenter::Generic.accepts?(activity) activity.stubs(:target).returns(Scrap.new) assert ActivityPresenter::Generic.accepts?(activity) activity.stubs(:target).returns(mock) assert ActivityPresenter::Generic.accepts?(activity) end end |