discourse/vendor/gems/discourse_task/spec/plugin_spec.rb

29 lines
571 B
Ruby
Raw Normal View History

2013-02-05 14:16:51 -05:00
require 'spec_helper'
require 'discourse_task/plugin'
describe DiscourseTask::Plugin do
let(:registry) { stub_everything }
let(:plugin) { DiscourseTask::Plugin.new(registry) }
context '.setup' do
2013-02-25 11:42:20 -05:00
it 'registers its js' do
2013-02-05 14:16:51 -05:00
plugin.expects(:register_js).with('discourse_task')
plugin.setup
2013-02-25 11:42:20 -05:00
end
2013-02-05 14:16:51 -05:00
2013-02-25 11:42:20 -05:00
it 'registers its css' do
2013-02-05 14:16:51 -05:00
plugin.expects(:register_css).with('discourse_task')
plugin.setup
2013-02-25 11:42:20 -05:00
end
2013-02-05 14:16:51 -05:00
2013-02-25 11:42:20 -05:00
it 'registers a task archetype' do
2013-02-05 14:16:51 -05:00
plugin.expects(:register_archetype).with('task')
plugin.setup
2013-02-25 11:42:20 -05:00
end
2013-02-05 14:16:51 -05:00
end
end