Skip to content

Instantly share code, notes, and snippets.

@epoch
Created November 5, 2014 22:31
Show Gist options
  • Save epoch/fe87eacb9a469965cab9 to your computer and use it in GitHub Desktop.
Save epoch/fe87eacb9a469965cab9 to your computer and use it in GitHub Desktop.
class Cake
def candle_count(number)
end
end
require 'minitest/autorun'
require "minitest/reporters"
Minitest::Reporters.use! Minitest::Reporters::SpecReporter.new()
class CakeTest < MiniTest::Test
def setup
@cake = Cake.new
end
def test_born_this_year
assert_equal '0 candles have burned for you', @cake.candle_count('01-01-2014')
end
def test_3_year_old
assert_equal '3 candles have burned for you', @cake.candle_count('01-01-2012')
end
def test_just_turn_1
assert_equal '1 candle have burned for you', @cake.candle_count('30-11-2012')
end
end
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment