Skip to content

Commit 9762483

Browse files
committed
Fix tests to reflect punctuation changes
1 parent 3eda82a commit 9762483

File tree

3 files changed

+8
-8
lines changed

3 files changed

+8
-8
lines changed

spec/group_spec.rb

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -133,7 +133,7 @@
133133
}
134134
}
135135
expect(content).to match(/invoke e/)
136-
expect(error).to match(/ERROR: thor two was called with arguments/)
136+
expect(error).to match(/ERROR: "thor two" was called with arguments/)
137137
end
138138

139139
it "shows invocation information to the user" do

spec/runner_spec.rb

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -112,7 +112,7 @@ def when_no_thorfiles_exist
112112
it "does not swallow Thor InvocationError" do
113113
ARGV.replace ["my_script:animal"]
114114
content = capture(:stderr) { Thor::Runner.start }
115-
expect(content.strip).to eq(%Q'ERROR: thor animal was called with no arguments\nUsage: "thor my_script:animal TYPE".')
115+
expect(content.strip).to eq(%Q'ERROR: "thor animal" was called with no arguments\nUsage: "thor my_script:animal TYPE"')
116116
end
117117
end
118118

spec/thor_spec.rb

Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -259,12 +259,12 @@ def boring(*args)
259259
stderr = capture(:stderr) { Scripts::Arities.start(args) }
260260
expect(stderr.strip).to eq(msg)
261261
end
262-
arity_asserter.call ["zero_args", "one" ], %Q'ERROR: thor zero_args was called with arguments ["one"]\nUsage: "thor scripts:arities:zero_args".'
263-
arity_asserter.call ["one_arg" ], %Q'ERROR: thor one_arg was called with no arguments\nUsage: "thor scripts:arities:one_arg ARG".'
264-
arity_asserter.call ["one_arg", "one", "two" ], %Q'ERROR: thor one_arg was called with arguments ["one", "two"]\nUsage: "thor scripts:arities:one_arg ARG".'
265-
arity_asserter.call ["one_arg", "one", "two" ], %Q'ERROR: thor one_arg was called with arguments ["one", "two"]\nUsage: "thor scripts:arities:one_arg ARG".'
266-
arity_asserter.call ["two_args", "one" ], %Q'ERROR: thor two_args was called with arguments ["one"]\nUsage: "thor scripts:arities:two_args ARG1 ARG2".'
267-
arity_asserter.call ["optional_arg", "one", "two" ], %Q'ERROR: thor optional_arg was called with arguments ["one", "two"]\nUsage: "thor scripts:arities:optional_arg [ARG]".'
262+
arity_asserter.call ["zero_args", "one" ], %Q'ERROR: "thor zero_args" was called with arguments ["one"]\nUsage: "thor scripts:arities:zero_args"'
263+
arity_asserter.call ["one_arg" ], %Q'ERROR: "thor one_arg" was called with no arguments\nUsage: "thor scripts:arities:one_arg ARG"'
264+
arity_asserter.call ["one_arg", "one", "two" ], %Q'ERROR: "thor one_arg" was called with arguments ["one", "two"]\nUsage: "thor scripts:arities:one_arg ARG"'
265+
arity_asserter.call ["one_arg", "one", "two" ], %Q'ERROR: "thor one_arg" was called with arguments ["one", "two"]\nUsage: "thor scripts:arities:one_arg ARG"'
266+
arity_asserter.call ["two_args", "one" ], %Q'ERROR: "thor two_args" was called with arguments ["one"]\nUsage: "thor scripts:arities:two_args ARG1 ARG2"'
267+
arity_asserter.call ["optional_arg", "one", "two" ], %Q'ERROR: "thor optional_arg" was called with arguments ["one", "two"]\nUsage: "thor scripts:arities:optional_arg [ARG]"'
268268
end
269269

270270
it "raises an error if the invoked command does not exist" do

0 commit comments

Comments
 (0)