spec/commander_spec.rb in visionmedia-commander-2.4.4 vs spec/commander_spec.rb in visionmedia-commander-2.4.6
- old
+ new
@@ -208,18 +208,18 @@
end
it "should allow multi-word strings as command names to be called correctly" do
arguments = nil
options = nil
- new_command_runner 'foo', 'bar', 'something', 'i', 'like', '--i-like', 'cookies', 'bar'
+ new_command_runner 'foo', 'bar', 'something', 'i', 'like', '--i-like', 'cookies'
command 'foo bar something' do |c|
c.option '--i-like WHAT'
c.when_called { |args, opts| arguments, options = args, opts }
end
command_runner.command_name_from_args.should eql('foo bar something')
- command_runner.args_without_command.should eql(['i', 'like', '--i-like', 'cookies', 'bar'])
+ command_runner.args_without_command.should eql(['i', 'like', '--i-like', 'cookies'])
command_runner.run!
- arguments.should eql(['i', 'like', 'bar'])
+ arguments.should eql(['i', 'like'])
options.i_like.should eql('cookies')
end
it "should allow multi-word strings as command names to be called correctly, with options before command name" do
arguments = nil