Current progress

This commit is contained in:
Adam Mohammed
2023-03-20 17:10:07 -04:00
parent 89cba6e600
commit 818436f4b4
42 changed files with 3907 additions and 0 deletions

40
koans/about_asserts.rb Normal file
View File

@@ -0,0 +1,40 @@
#!/usr/bin/env ruby
# -*- ruby -*-
require File.expand_path(File.dirname(__FILE__) + '/neo')
class AboutAsserts < Neo::Koan
# We shall contemplate truth by testing reality, via asserts.
def test_assert_truth
assert true # This should be true
end
# Enlightenment may be more easily achieved with appropriate
# messages.
def test_assert_with_message
assert true, "This should be true -- Please fix this"
end
# To understand reality, we must compare our expectations against
# reality.
def test_assert_equality
expected_value = 2
actual_value = 1 + 1
assert expected_value == actual_value
end
# Some ways of asserting equality are better than others.
def test_a_better_way_of_asserting_equality
expected_value = 2
actual_value = 1 + 1
assert_equal expected_value, actual_value
end
# Sometimes we will ask you to fill in the values
def test_fill_in_values
assert_equal 2, 1 + 1
end
end