Commit cbcb00b1 authored by Keith Smiley's avatar Keith Smiley

Adding which tests

parent f9a060bb
......@@ -142,18 +142,43 @@ module Pod
end
end
#-------------------------------------------------------------------------#
describe "which subcommand" do
extend SpecHelper::TemporaryRepos
it "errors if a given podspec doesn't exist" do
e = lambda { command('spec', 'which', 'some_pod_that_doesnt_exist').run }.should.raise Informative
e.message.should.match /Unable to find a pod with/
end
it "prints the path of a given podspec" do
lambda { command('spec', 'which', 'kslabel').run }
# text = "AFNetworking.podspec"
# UI.output.should.include text
# output = UI.output
# puts UI.output
end
it "complains provided spec name is ambigious" do
e = lambda { command('spec', 'cat', 'AF').run }.should.raise Informative
e.message.should.match /More than one/
end
end
#-------------------------------------------------------------------------#
describe "cat subcommand" do
extend SpecHelper::TemporaryRepos
it "complains it cant't find a spec to read" do
lambda { command('spec', 'cat', 'not-exissting-spec').run }.should.raise Informative
e = lambda { command('spec', 'cat', 'some_pod_that_doesnt_exist').run }.should.raise Informative
e.message.should.match /Unable to find/
end
it "complains provided spec name is ambigious" do
e = lambda { command('spec', 'cat', 'AF').run }.should.raise Informative
e.message.should.match /More that one/
e.message.should.match /More than one/
end
it "prints the spec on standard output" do
......
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