Skip to content

Instantly share code, notes, and snippets.

@richo
Created March 22, 2012 10:23
Show Gist options
  • Save richo/2157594 to your computer and use it in GitHub Desktop.
Save richo/2157594 to your computer and use it in GitHub Desktop.
require 'twat'
require 'mocha'
require 'pry'
describe Twat do
# before(:each) do
# end
# after(:each) do
# end
it "Should call follow tag by default" do
#Twat::Subcommands::FollowTag.any_instance.expects(:run)
Twat::Subcommands::FollowTag.any_instance.expects(:asdf).with("rawr")
# ARGV = []
# Twat::Twat.new.cli_run
end
it "Should do something else" do
m = mock()
m.expects(:rawr).at_least_once
# puts m.thing
puts m.rawr
ARGV.expects(:gets).returns("rawr")
Twat::Twat.expects(:cli_runasdf).at_least_once
# 123.should == "123"
end
end
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment