Skip to content

Commit

Permalink
Ensure all whitespace, in addition to \n are removed
Browse files Browse the repository at this point in the history
  • Loading branch information
Steven G. Harms committed Oct 1, 2018
1 parent d0e288b commit 2539aa9
Showing 1 changed file with 8 additions and 0 deletions.
8 changes: 8 additions & 0 deletions spec/01_greeting_spec.rb
Original file line number Diff line number Diff line change
Expand Up @@ -19,5 +19,13 @@

expect(output).to include("Hello Sally. It's nice to meet you.")
end

it 'greets the person with additional whitespace removed' do
allow($stdout).to receive(:puts)

output = capture_puts{ greeting(" Sally\t ") }

expect(output).to include("Hello Sally. It's nice to meet you.")
end
end
end

0 comments on commit 2539aa9

Please sign in to comment.