test/file_library_test.rb in boson-0.2.1 vs test/file_library_test.rb in boson-0.2.2
- old
+ new
@@ -28,11 +28,13 @@
load 'github', :file_string=>"module Github; def blah; end; end", :exists=>false
library_has_module('site/github', "Boson::Commands::Site::Github")
command_exists?('blah')
end
- test "prints error for file library with no module" do
- capture_stderr { load(:blah, :file_string=>"def blah; end") }.should =~ /Can't.*at least/
+ test "loads a plugin library by creating its module" do
+ load(:blah, :file_string=>"def blah; end")
+ library_has_module('blah', "Boson::Commands::Blah")
+ command_exists?('blah', false)
end
test "prints error for file library with multiple modules" do
capture_stderr { load(:blah, :file_string=>"module Doo; end; module Daa; end") }.should =~ /Can't.*config/
end
\ No newline at end of file