Wow. I was just happy to solve this in about an hour. Bravo!
WHAT ???
How the fkk is this even possible? HOW HOW HOW ???????????? What it was ?
I wrote 10 lines of code for this, who you are ?
Expect_error takes an optional message we're expecting and a block to run which we expect to raise an error:
Test.expect_error(optional_message_if_any) { call to test }
So, we can check for popping off an empty stack raising an error (which we don't know the message for):
Test.expect_error { Magic.spell_stack }
Or for pushing a sorcery spell when there's already spells on the stack
Test.assert_equals(Magic.spell_stack({'name' => 'Enervate', 'type' => 'sorcery' }), 1) Test.expect_error { Magic.spell_stack({ 'name' => 'Enervate', 'type' => 'sorcery' }) }
This comment is hidden because it contains spoiler information about the solution
Merge conflict. Fork and update the description.
It looks like it's been decided the other way...
He is using Regex (Regular Expression) to match the conditions required. Regex is really powerful, but can be a pain in the ass to work with sometimes. But it's a clever solution :-)
Not an issue.
Can someone elaborate on this wonderful one? Thanks!
Duplicate.
.
Fixed.
Dup.
Or maybe you didn't refresh after the tests were updated.
Closing.
Wow. I was just happy to solve this in about an hour. Bravo!
WHAT ???
How the fkk is this even possible?
HOW HOW HOW ????????????
What it was ?
I wrote 10 lines of code for this, who you are ?
Expect_error takes an optional message we're expecting and a block to run which we expect to raise an error:
So, we can check for popping off an empty stack raising an error (which we don't know the message for):
Or for pushing a sorcery spell when there's already spells on the stack
This comment is hidden because it contains spoiler information about the solution
Merge conflict. Fork and update the description.
It looks like it's been decided the other way...
He is using Regex (Regular Expression) to match the conditions required. Regex is really powerful, but can be a pain in the ass to work with sometimes. But it's a clever solution :-)
Not an issue.
Can someone elaborate on this wonderful one? Thanks!
Duplicate.
.
Fixed.
Dup.
Or maybe you didn't refresh after the tests were updated.
Closing.
Loading more items...