Sha256: 69fe562df165707a2717110b2df347f8f124f9de14692286c565a0ae6d7c1532
Contents?: true
Size: 1.09 KB
Versions: 4
Compression:
Stored size: 1.09 KB
Contents
require File.join(File.dirname(__FILE__), 'test_helper') class BondTest < Test::Unit::TestCase context "debrief" do before(:each) {|e| Bond.instance_eval("@agent = @config = nil")} test "prints error if readline_plugin is not a module" do capture_stderr { Bond.debrief :readline_plugin=>false }.should =~ /Invalid/ end test "prints error if readline_plugin doesn't have all required methods" do capture_stderr {Bond.debrief :readline_plugin=>Module.new{ def setup; end } }.should =~ /Invalid/ end test "no error if valid readline_plugin" do capture_stderr {Bond.debrief :readline_plugin=>valid_readline_plugin }.should == '' end test "sets default mission" do default_mission = lambda {} Bond.debrief :default_mission=>default_mission, :readline_plugin=>valid_readline_plugin Bond.agent.default_mission.action.should == default_mission end end test "reset clears existing missions" do Bond.complete(:on=>/blah/) {[]} Bond.agent.missions.size.should_not == 0 Bond.reset Bond.agent.missions.size.should == 0 end end
Version data entries
4 entries across 4 versions & 2 rubygems
Version | Path |
---|---|
cldwalker-bond-0.1.0 | test/bond_test.rb |
cldwalker-bond-0.1.1 | test/bond_test.rb |
bond-0.1.0 | test/bond_test.rb |
bond-0.1.1 | test/bond_test.rb |