Skip to content

Instantly share code, notes, and snippets.

@havenwood

havenwood/intelo.rb Secret

Last active Sep 7, 2019
Embed
What would you like to do?
Intelo
# given
foo(6, 7)
# then
#=> 13
# given
foo(1, -1)
# then
#=> 0
##
# Or another way
# given
a = 6
b = 7
# then
13
# given
a = 1
b = -1
# then
0
##
# Or, better yet
require 'minitest/autorun'
def foo(a, b)
end
describe "Intelo's problem" do
it 'is as desired' do
assert_equal 13, foo(6, 7)
assert_equal 0, foo(1, -1)
end
end
@havenwood

This comment has been minimized.

Copy link
Owner Author

@havenwood havenwood commented Sep 7, 2019

# Running:

F

Failure:
Intelo's problem#test_0001_is as desired [intelo.rb:8]:
Expected: 13
  Actual: nil


rails test intelo.rb:7



Finished in 0.001218s, 821.0181 runs/s, 821.0181 assertions/s.
1 runs, 1 assertions, 1 failures, 0 errors, 0 skips
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
You can’t perform that action at this time.