spec/unit/cli_opts_spec.rb in af-0.3.12.3 vs spec/unit/cli_opts_spec.rb in af-0.3.13.beta.5
- old
+ new
@@ -63,6 +63,23 @@
cli = VMC::Cli::Runner.new(args.split).parse_options!
cli.options[:force].should be_true
cli.options[:all].should be_true
end
+ it 'should parse debug correctly' do
+ cli = VMC::Cli::Runner.new().parse_options!
+ cli.options[:debug].should_not be
+ args = "--debug"
+ cli = VMC::Cli::Runner.new(args.split).parse_options!
+ cli.options[:debug].should == 'run'
+ args = "--debug suspend"
+ cli = VMC::Cli::Runner.new(args.split).parse_options!
+ cli.options[:debug].should == 'suspend'
+ args = "-d"
+ cli = VMC::Cli::Runner.new(args.split).parse_options!
+ cli.options[:debug].should == 'run'
+ args = "-d suspend"
+ cli = VMC::Cli::Runner.new(args.split).parse_options!
+ cli.options[:debug].should == 'suspend'
+ end
+
end