Commit c9e64e33 authored by Eloy Duran's avatar Eloy Duran

Add stubs for comamnd classes.

parent f2e56cf1
module Pod
autoload :Command, 'cocoa_pods/command'
end
module Pod
module Command
autoload :Help, 'cocoa_pods/command/help'
autoload :Setup, 'cocoa_pods/command/setup'
autoload :Spec, 'cocoa_pods/command/spec'
autoload :Repo, 'cocoa_pods/command/repo'
def self.parse(*argv)
argv = argv.dup
command = case argv.shift
when 'help' then Help
when 'setup' then Setup
when 'spec' then Spec
when 'repo' then Repo
end
command.new(*argv)
end
end
end
module Pod
module Command
class Help
end
end
end
module Pod
module Command
class Repo
end
end
end
module Pod
module Command
class Setup
end
end
end
module Pod
module Command
class Spec
end
end
end
require 'rubygems'
require 'mac_bacon'
$:.unshift File.expand_path('../../lib', __FILE__)
require 'cocoa_pods'
require File.expand_path('../../spec_helper', __FILE__)
describe "Pod::Command" do
it "returns the proper command class" do
Pod::Command.parse("help").should.be.instance_of Pod::Command::Help
Pod::Command.parse("setup").should.be.instance_of Pod::Command::Setup
Pod::Command.parse("spec").should.be.instance_of Pod::Command::Spec
Pod::Command.parse("repo").should.be.instance_of Pod::Command::Repo
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