Skip to content

Commit bf0fca0

Browse files
committed
Update alias test to use valid aliases
Aliases are prefixed with a dash if they do not contain one. However, this only makes sense on single letter aliases. Multi-character aliases with a single dash cannot actually be used (although they can be specified). Therefore, these tests are updated to use aliases that would actually work.
1 parent e4907fd commit bf0fca0

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

spec/parser/option_spec.rb

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -105,11 +105,11 @@ def option(name, options = {})
105105

106106
describe "with key as an array" do
107107
it "sets the first items in the array to the name" do
108-
expect(parse([:foo, :bar, :baz], true).name).to eq("foo")
108+
expect(parse([:foo, :b, "--bar"], true).name).to eq("foo")
109109
end
110110

111111
it "sets all other items as aliases" do
112-
expect(parse([:foo, :bar, :baz], true).aliases).to eq([:bar, :baz])
112+
expect(parse([:foo, :b, "--bar"], true).aliases).to eq([:b, "--bar"])
113113
end
114114
end
115115
end

0 commit comments

Comments
 (0)