Commit 61f54169 authored by Ian Ynda-Hummel's avatar Ian Ynda-Hummel

Add a basic spec for the init subcommand.

parent 57abeabe
require File.expand_path('../../../spec_helper', __FILE__)
module Pod
describe Command::Init do
it "runs with no parameters" do
lambda { run_command('init') }.should.not.raise CLAide::Help
end
it "complains when given parameters" do
lambda { run_command('init', 'create') }.should.raise CLAide::Help
lambda { run_command('init', '--create') }.should.raise CLAide::Help
lambda { run_command('init', 'NAME') }.should.raise CLAide::Help
lambda { run_command('init', 'createa') }.should.raise CLAide::Help
lambda { run_command('init', 'agument1', '2') }.should.raise CLAide::Help
lambda { run_command('init', 'which') }.should.raise CLAide::Help
lambda { run_command('init', 'cat') }.should.raise CLAide::Help
lambda { run_command('init', 'edit') }.should.raise CLAide::Help
end
extend SpecHelper::TemporaryRepos
it "creates a Podfile" do
run_command('init')
path = temporary_directory + 'Podfile'
File.exists?(path).should == true
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