spec/lib/cli_spec.rb in picky-1.2.3 vs spec/lib/cli_spec.rb in picky-1.2.4

- old
+ new

@@ -8,9 +8,29 @@ # TODO Finish this prototype Spec, redesign. # describe Picky::CLI do + describe 'instance' do + before(:each) do + @cli = Picky::CLI.new + end + describe 'executor_class_for' do + it 'returns Help by default' do + @cli.executor_class_for.should == [Picky::CLI::Help] + end + it 'returns Generator for generate' do + @cli.executor_class_for(:generate).should == [Picky::CLI::Generate, "sinatra_client | unicorn_server | empty_unicorn_server", "app_directory_name (optional)"] + end + it 'returns Help for help' do + @cli.executor_class_for(:help).should == [Picky::CLI::Help] + end + it 'returns Statistics for stats' do + @cli.executor_class_for(:stats).should == [Picky::CLI::Statistics, "logfile, e.g. log/search.log", "port (optional)"] + end + end + end + describe Picky::CLI::Base do before(:each) do @executor = Picky::CLI::Base.new end describe 'usage' do \ No newline at end of file