spec/clamp/option/definition_spec.rb in clamp-1.0.1 vs spec/clamp/option/definition_spec.rb in clamp-1.1.0
- old
+ new
@@ -1,6 +1,6 @@
-require 'spec_helper'
+require "spec_helper"
describe Clamp::Option::Definition do
context "with String argument" do
@@ -193,12 +193,12 @@
it "defaults to an empty Array" do
expect(option.default_value).to eql []
end
it "can be overridden" do
- option = described_class.new("-H", "HEADER", "extra header", :multivalued => true, :default => [1,2,3])
- expect(option.default_value).to eql [1,2,3]
+ option = described_class.new("-H", "HEADER", "extra header", :multivalued => true, :default => [1, 2, 3])
+ expect(option.default_value).to eql [1, 2, 3]
end
end
describe "#attribute_name" do
@@ -232,11 +232,11 @@
end
describe "Command#help" do
it "includes help for each option exactly once" do
- subcommand = command_class.send(:find_subcommand, 'foo')
+ subcommand = command_class.send(:find_subcommand, "foo")
subcommand_help = subcommand.subcommand_class.help("")
expect(subcommand_help.lines.grep(/--bar BAR/).count).to eql 1
end
end
@@ -245,10 +245,10 @@
describe "a required option" do
it "rejects :default" do
expect do
described_class.new("--key-file", "FILE", "SSH identity",
- :required => true, :default => "hello")
+ :required => true, :default => "hello")
end.to raise_error(ArgumentError)
end
it "rejects :flag options" do
expect do