-
Notifications
You must be signed in to change notification settings - Fork 1
Expand file tree
/
Copy pathexample.tt
More file actions
29 lines (26 loc) · 782 Bytes
/
example.tt
File metadata and controls
29 lines (26 loc) · 782 Bytes
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
#!/usr/bin/env ruby
gem 'minitest', '>= 5.0.0'
require 'minitest/autorun'
require_relative 'leap'
# Test data version:
# <%= sha1 %>
class Date
def leap?
throw "Implement this yourself instead of using Ruby's implementation."
end
alias gregorian_leap? leap?
alias julian_leap? leap?
end
class YearTest < Minitest::Test<% test_cases.each do |test_case| %>
def <%= test_case.name %><% if test_case.skipped? %>
skip<% end %><% if test_case.expected%>
assert <%= test_case.do %>, "<%= test_case.failure_message%>"<% else %>
refute <%= test_case.do %>, "<%= test_case.failure_message%>"<% end%>
end
<% end %>
<%= IO.read(XRUBY_LIB + '/bookkeeping.md') %>
def test_bookkeeping
skip
assert_equal <%= version.next %>, BookKeeping::VERSION
end
end