Skip to content

[Bob] Correct test #227

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 2 commits into from
Oct 5, 2023
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
1 change: 1 addition & 0 deletions exercises/practice/bob/.meta/example.coffee
Original file line number Diff line number Diff line change
@@ -1,6 +1,7 @@
class Bob
hey: (message) -> switch
when message.trim() == "" then "Fine. Be that way!"
when message.match(/[a-zA-Z]/) and message == message.toUpperCase() and message[message.length - 1] == "?" then "Calm down, I know what I'm doing!"
when message.match(/[a-zA-Z]/) and message == message.toUpperCase() then "Whoa, chill out!"
when message[message.length - 1] == "?" then "Sure."
else "Whatever."
Expand Down
4 changes: 2 additions & 2 deletions exercises/practice/bob/bob.spec.coffee
Original file line number Diff line number Diff line change
Expand Up @@ -22,8 +22,8 @@ describe 'Bob', ->
expect(result).toEqual 'Whatever.'

xit 'forceful questions', ->
result = bob.hey 'WHAT THE HELL WERE YOU THINKING?'
expect(result).toEqual 'Whoa, chill out!'
result = bob.hey 'WHAT'S GOING ON?'
expect(result).toEqual "Calm down, I know what I'm doing!"

xit 'shouting numbers', ->
result = bob.hey '1, 2, 3 GO!'
Expand Down