Skip to content

Instantly share code, notes, and snippets.

@jackdempsey
Created September 15, 2010 01:04
Show Gist options
  • Save jackdempsey/580076 to your computer and use it in GitHub Desktop.
Save jackdempsey/580076 to your computer and use it in GitHub Desktop.
it "loads by basename" do
- Dir.stubs(:[]).returns(['./test/commands/site/github.rb'])
+ Dir.stubs(:[]).returns([RUBY_VERSION < '1.9.2' ? './test/commands/site/github.rb' :
+ File.expand_path('./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')
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment