ref: master
plugins/foo/test/unit/foo_plugin_test.rb
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 |
require 'test_helper' class FooPluginTest < ActiveSupport::TestCase def test_foo FooPlugin::Bar.create! end def test_monkey_patch Profile.new.bar end should "respond to new hotspots" do plugin = FooPlugin.new assert plugin.respond_to?(:foo_plugin_my_hotspot) assert plugin.respond_to?(:foo_plugin_tab_title) end should "other plugin respond to new hotspots" do class TestPlugin < Noosfero::Plugin end plugin = TestPlugin.new assert plugin.respond_to?(:foo_plugin_my_hotspot) assert plugin.respond_to?(:foo_plugin_tab_title) end end |