Skip to content

Instantly share code, notes, and snippets.

@saiury92
Created December 30, 2019 19:15
Show Gist options
  • Save saiury92/8e811aac1839e389a86676efd125ec05 to your computer and use it in GitHub Desktop.
Save saiury92/8e811aac1839e389a86676efd125ec05 to your computer and use it in GitHub Desktop.
require 'date'
require 'test/unit'
require 'test/unit/ui/console/testrunner'
class TestDate < Test::Unit::TestCase
def test_that_today_is_last_day_of_the_year
assert_equal Date.today, Date.civil(2019, 12, 31)
end
end
saiury_tests = TestDate.new('test_that_today_is_last_day_of_the_year')
Test::Unit::UI::Console::TestRunner.run(saiury_tests)
#=> 1 tests, 1 assertions, 0 failures, 0 errors, 0 pendings, 0 omissions, 0 notifications
# 100% passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment