Commit 4412dac4 authored by Carson McDonald's avatar Carson McDonald

Add more test coverage for Command

parent 5699bf84
......@@ -45,8 +45,8 @@ module Pod
def self.run(argv)
argv = CLAide::ARGV.new(argv)
if argv.flag?('version')
puts VERSION
exit!(0)
UI.puts VERSION
exit 0
end
super(argv)
UI.print_warnings
......
require File.expand_path('../../spec_helper', __FILE__)
module Pod
describe Command do
extend SpecHelper::Command
it "displays the current version number with the --version flag" do
lambda { Pod::Command.run(['--version']) }.should.raise SystemExit
UI.output.should.include VERSION
end
it "reports the location of the AFNetworking spec" do
lambda { Pod::Command.run(['spec', 'which', 'AFNetworking']) }.should.not.raise
UI.output.should.include 'spec/fixtures/spec-repos/master/AFNetworking'
end
end
end
......@@ -25,6 +25,9 @@ module Pod
def print(message)
@output << message
end
def print_warnings
end
end
end
end
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment