test/file_library_test.rb in boson-0.1.0 vs test/file_library_test.rb in boson-0.2.0

- old
+ new

@@ -11,10 +11,23 @@ command_exists?('blah') end test "in a subdirectory loads" do load 'site/delicious', :file_string=>"module Delicious; def blah; end; end" - library_has_module('site/delicious', "Boson::Commands::Delicious") + library_has_module('site/delicious', "Boson::Commands::Site::Delicious") + command_exists?('blah') + end + + test "in a sub subdirectory loads" do + load 'web/site/delicious', :file_string=>"module Delicious; def blah; end; end" + library_has_module('web/site/delicious', "Boson::Commands::Web::Site::Delicious") + command_exists?('blah') + end + + test "loads by basename" do + Dir.stubs(:[]).returns(['./test/commands/site/github.rb']) + 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/