Skip to content

Commit 83683d5

Browse files
committed
Tests: avoid passing passing params unnecessarily
1 parent 07b99e4 commit 83683d5

File tree

1 file changed

+11
-11
lines changed

1 file changed

+11
-11
lines changed

spec/cucumber/glue/proto_world_spec.rb

+11-11
Original file line numberDiff line numberDiff line change
@@ -83,24 +83,24 @@ def object.to_s
8383

8484
describe 'when logging multiple items on one call' do
8585
define_feature <<-FEATURE
86-
Feature: Banana party
86+
Feature: Logging multiple entries
8787
88-
Scenario: Monkey eats banana
89-
When monkey eats banana
88+
Scenario: Logging multiple entries
89+
When logging multiple entries
9090
FEATURE
9191

9292
define_steps do
93-
When('{word} {word} {word}') do |subject, verb, complement|
94-
log "subject: #{subject}", "verb: #{verb}", "complement: #{complement}"
93+
When('logging multiple entries') do
94+
log 'entry one', 'entry two', 'entry three'
9595
end
9696
end
9797

98-
it 'logs each parameter independently' do
99-
expect(@out.string).to include [
100-
' subject: monkey',
101-
' verb: eats',
102-
' complement: banana'
103-
].join("\n")
98+
it 'logs each entry independently' do
99+
expect(@out.string).to include([
100+
' entry one',
101+
' entry two',
102+
' entry three'
103+
].join("\n"))
104104
end
105105
end
106106

0 commit comments

Comments
 (0)