Skip to content
Closed
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion exercises/acronym/example.tt
Original file line number Diff line number Diff line change
Expand Up @@ -14,6 +14,6 @@ class AcronymTest < Minitest::Test<% test_cases.each do |test_case| %>
<%= IO.read(XRUBY_LIB + '/bookkeeping.md') %>
def test_bookkeeping
skip
assert_equal <%= version.next %>, BookKeeping::VERSION
assert_equal <%= version %>, BookKeeping::VERSION
end
end
2 changes: 1 addition & 1 deletion exercises/all-your-base/example.tt
Original file line number Diff line number Diff line change
Expand Up @@ -12,6 +12,6 @@ class AllYourBaseTest < Minitest::Test<% test_cases.each do |test_case| %>
<%= IO.read(XRUBY_LIB + '/bookkeeping.md') %>
def test_bookkeeping
skip
assert_equal <%= version.next %>, BookKeeping::VERSION
assert_equal <%= version %>, BookKeeping::VERSION
end
end
2 changes: 1 addition & 1 deletion exercises/alphametics/example.tt
Original file line number Diff line number Diff line change
Expand Up @@ -17,6 +17,6 @@ class AlphameticsTest < Minitest::Test
<%= IO.read(XRUBY_LIB + '/bookkeeping.md') %>
def test_bookkeeping
skip
assert_equal <%= version.next %>, BookKeeping::VERSION
assert_equal <%= version %>, BookKeeping::VERSION
end
end
2 changes: 1 addition & 1 deletion exercises/anagram/example.tt
Original file line number Diff line number Diff line change
Expand Up @@ -14,6 +14,6 @@ class AnagramTest < Minitest::Test<% test_cases.each do |test_case| %>
<%= IO.read(XRUBY_LIB + '/bookkeeping.md') %>
def test_bookkeeping
skip
assert_equal <%= version.next %>, BookKeeping::VERSION
assert_equal <%= version %>, BookKeeping::VERSION
end
end
2 changes: 1 addition & 1 deletion exercises/binary/example.tt
Original file line number Diff line number Diff line change
Expand Up @@ -15,6 +15,6 @@ class BinaryTest < Minitest::Test<% test_cases.each do |test_case| %>
<%= IO.read(XRUBY_LIB + '/bookkeeping.md') %>
def test_bookkeeping
skip
assert_equal <%= version.next %>, BookKeeping::VERSION
assert_equal <%= version %>, BookKeeping::VERSION
end
end
2 changes: 1 addition & 1 deletion exercises/bowling/example.tt
Original file line number Diff line number Diff line change
Expand Up @@ -24,6 +24,6 @@ class BowlingTest < Minitest::Test
<%= IO.read(XRUBY_LIB + '/bookkeeping.md') %>
def test_bookkeeping
skip
assert_equal <%= version.next %>, BookKeeping::VERSION
assert_equal <%= version %>, BookKeeping::VERSION
end
end
2 changes: 1 addition & 1 deletion exercises/bracket-push/example.tt
Original file line number Diff line number Diff line change
Expand Up @@ -14,6 +14,6 @@ class BracketsTest < Minitest::Test<% test_cases.each do |test_case| %>
<%= IO.read(XRUBY_LIB + '/bookkeeping.md') %>
def test_bookkeeping
skip
assert_equal <%= version.next %>, BookKeeping::VERSION
assert_equal <%= version %>, BookKeeping::VERSION
end
end
2 changes: 1 addition & 1 deletion exercises/clock/example.tt
Original file line number Diff line number Diff line change
Expand Up @@ -14,6 +14,6 @@ class ClockTest < Minitest::Test<% test_cases.each do |test_case| %>
<%= IO.read(XRUBY_LIB + '/bookkeeping.md') %>
def test_bookkeeping
skip
assert_equal <%= version.next %>, BookKeeping::VERSION
assert_equal <%= version %>, BookKeeping::VERSION
end
end
2 changes: 1 addition & 1 deletion exercises/custom-set/example.tt
Original file line number Diff line number Diff line change
Expand Up @@ -14,6 +14,6 @@ class CustomSetTest < Minitest::Test<% test_cases.each do |test_case| %>
<%= IO.read(XRUBY_LIB + '/bookkeeping.md') %>
def test_bookkeeping
skip
assert_equal <%= version.next %>, BookKeeping::VERSION
assert_equal <%= version %>, BookKeeping::VERSION
end
end
2 changes: 1 addition & 1 deletion exercises/difference-of-squares/example.tt
Original file line number Diff line number Diff line change
Expand Up @@ -19,6 +19,6 @@ class DifferenceOfSquaresTest < Minitest::Test<% test_cases.each do |test_case|
<%= IO.read(XRUBY_LIB + '/bookkeeping.md') %>
def test_bookkeeping
skip
assert_equal <%= version.next %>, BookKeeping::VERSION
assert_equal <%= version %>, BookKeeping::VERSION
end
end
2 changes: 1 addition & 1 deletion exercises/dominoes/example.tt
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,7 @@ class DominoesTest < Minitest::Test
<%= IO.read(XRUBY_LIB + '/bookkeeping.md') %>
def test_bookkeeping
skip
assert_equal <%= version.next %>, BookKeeping::VERSION
assert_equal <%= version %>, BookKeeping::VERSION
end

# It's infeasible to use example-based tests for this exercise,
Expand Down
2 changes: 1 addition & 1 deletion exercises/gigasecond/example.tt
Original file line number Diff line number Diff line change
Expand Up @@ -17,6 +17,6 @@ class GigasecondTest < Minitest::Test<% test_cases.each do |test_case| %>

<%= IO.read(XRUBY_LIB + '/bookkeeping.md') %>
def test_bookkeeping
assert_equal <%= version.next %>, BookKeeping::VERSION
assert_equal <%= version %>, BookKeeping::VERSION
end
end
2 changes: 1 addition & 1 deletion exercises/grains/example.tt
Original file line number Diff line number Diff line change
Expand Up @@ -12,6 +12,6 @@ class GrainsTest < Minitest::Test<% test_cases.each do |test_case| %>
<%= IO.read(XRUBY_LIB + '/bookkeeping.md') %>
def test_bookkeeping
skip
assert_equal <%= version.next %>, BookKeeping::VERSION
assert_equal <%= version %>, BookKeeping::VERSION
end
end
2 changes: 1 addition & 1 deletion exercises/hamming/example.tt
Original file line number Diff line number Diff line change
Expand Up @@ -15,6 +15,6 @@ class HammingTest < Minitest::Test<% test_cases.each do |test_case| %>
<%= IO.read(XRUBY_LIB + '/bookkeeping.md') %>
def test_bookkeeping
skip
assert_equal <%= version.next %>, BookKeeping::VERSION
assert_equal <%= version %>, BookKeeping::VERSION
end
end
2 changes: 1 addition & 1 deletion exercises/isogram/example.tt
Original file line number Diff line number Diff line change
Expand Up @@ -15,6 +15,6 @@ class IsogramTest < Minitest::Test<% test_cases.each do |test_case| %>
<%= IO.read(XRUBY_LIB + '/bookkeeping.md') %>
def test_bookkeeping
skip
assert_equal <%= version.next %>, BookKeeping::VERSION
assert_equal <%= version %>, BookKeeping::VERSION
end
end
2 changes: 1 addition & 1 deletion exercises/largest-series-product/example.tt
Original file line number Diff line number Diff line change
Expand Up @@ -15,6 +15,6 @@ class Seriestest < Minitest::Test<% test_cases.each do |test_case| %>
<% end %>
<%= IO.read(XRUBY_LIB + '/bookkeeping.md') %>
def test_bookkeeping
assert_equal <%= version.next %>, BookKeeping::VERSION
assert_equal <%= version %>, BookKeeping::VERSION
end
end
2 changes: 1 addition & 1 deletion exercises/leap/example.tt
Original file line number Diff line number Diff line change
Expand Up @@ -24,6 +24,6 @@ class YearTest < Minitest::Test<% test_cases.each do |test_case| %>
<%= IO.read(XRUBY_LIB + '/bookkeeping.md') %>
def test_bookkeeping
skip
assert_equal <%= version.next %>, BookKeeping::VERSION
assert_equal <%= version %>, BookKeeping::VERSION
end
end
2 changes: 1 addition & 1 deletion exercises/nth-prime/example.tt
Original file line number Diff line number Diff line change
Expand Up @@ -16,6 +16,6 @@ class NthPrimeTest < Minitest::Test<% test_cases.each do |test_case| %>
<%= IO.read(XRUBY_LIB + '/bookkeeping.md') %>
def test_bookkeeping
skip
assert_equal <%= version.next %>, BookKeeping::VERSION
assert_equal <%= version %>, BookKeeping::VERSION
end
end
2 changes: 1 addition & 1 deletion exercises/pangram/example.tt
Original file line number Diff line number Diff line change
Expand Up @@ -15,6 +15,6 @@ class PangramTest < Minitest::Test<% test_cases.each do |test_case| %>
<%= IO.read(XRUBY_LIB + '/bookkeeping.md') %>
def test_bookkeeping
skip
assert_equal <%= version.next %>, BookKeeping::VERSION
assert_equal <%= version %>, BookKeeping::VERSION
end
end
2 changes: 1 addition & 1 deletion exercises/queen-attack/example.tt
Original file line number Diff line number Diff line change
Expand Up @@ -17,6 +17,6 @@ class QueenTest < Minitest::Test
<%= IO.read(XRUBY_LIB + '/bookkeeping.md') %>
def test_bookkeeping
skip
assert_equal <%= version.next %>, BookKeeping::VERSION
assert_equal <%= version %>, BookKeeping::VERSION
end
end
2 changes: 1 addition & 1 deletion exercises/raindrops/example.tt
Original file line number Diff line number Diff line change
Expand Up @@ -14,6 +14,6 @@ class RaindropsTest < Minitest::Test<% test_cases.each do |test_case| %>
<%= IO.read(XRUBY_LIB + '/bookkeeping.md') %>
def test_bookkeeping
skip
assert_equal <%= version.next %>, BookKeeping::VERSION
assert_equal <%= version %>, BookKeeping::VERSION
end
end
2 changes: 1 addition & 1 deletion exercises/rna-transcription/example.tt
Original file line number Diff line number Diff line change
Expand Up @@ -14,6 +14,6 @@ class ComplementTest < Minitest::Test<% test_cases.each do |test_case| %>
<%= IO.read(XRUBY_LIB + '/bookkeeping.md') %>
def test_bookkeeping
skip
assert_equal <%= version.next %>, BookKeeping::VERSION
assert_equal <%= version %>, BookKeeping::VERSION
end
end
2 changes: 1 addition & 1 deletion exercises/roman-numerals/example.tt
Original file line number Diff line number Diff line change
Expand Up @@ -14,6 +14,6 @@ class RomanNumeralsTest < Minitest::Test<% test_cases.each do |test_case| %>
<%= IO.read(XRUBY_LIB + '/bookkeeping.md') %>
def test_bookkeeping
skip
assert_equal <%= version.next %>, BookKeeping::VERSION
assert_equal <%= version %>, BookKeeping::VERSION
end
end
2 changes: 1 addition & 1 deletion exercises/run-length-encoding/example.tt
Original file line number Diff line number Diff line change
Expand Up @@ -17,6 +17,6 @@ class RunLengthEncodingTest < Minitest::Test<% test_cases.each do |test_case| %>
<%= IO.read(XRUBY_LIB + '/bookkeeping.md') %>
def test_bookkeeping
skip
assert_equal <%= version.next %>, BookKeeping::VERSION
assert_equal <%= version %>, BookKeeping::VERSION
end
end
2 changes: 1 addition & 1 deletion exercises/sieve/example.tt
Original file line number Diff line number Diff line change
Expand Up @@ -16,6 +16,6 @@ class SieveTest < Minitest::Test<% test_cases.each do |test_case| %>
<%= IO.read(XRUBY_LIB + '/bookkeeping.md') %>
def test_bookkeeping
skip
assert_equal <%= version.next %>, BookKeeping::VERSION
assert_equal <%= version %>, BookKeeping::VERSION
end
end
2 changes: 1 addition & 1 deletion exercises/tournament/example.tt
Original file line number Diff line number Diff line change
Expand Up @@ -18,6 +18,6 @@ class TournamentTest < Minitest::Test
<%= IO.read(XRUBY_LIB + '/bookkeeping.md') %>
def test_bookkeeping
skip
assert_equal <%= version.next %>, BookKeeping::VERSION
assert_equal <%= version %>, BookKeeping::VERSION
end
end
2 changes: 1 addition & 1 deletion exercises/transpose/example.tt
Original file line number Diff line number Diff line change
Expand Up @@ -17,6 +17,6 @@ class TransposeTest < Minitest::Test<% test_cases.each do |test_case| %>
<%= IO.read(XRUBY_LIB + '/bookkeeping.md') %>
def test_bookkeeping
skip
assert_equal <%= version.next %>, BookKeeping::VERSION
assert_equal <%= version %>, BookKeeping::VERSION
end
end
2 changes: 1 addition & 1 deletion exercises/triangle/example.tt
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,7 @@ class TriangleTest < Minitest::Test<% test_cases.each do |test_case| %>
<%= IO.read(XRUBY_LIB + '/bookkeeping.md') %>
def test_bookkeeping
skip
assert_equal <%= version.next %>, BookKeeping::VERSION
assert_equal <%= version %>, BookKeeping::VERSION
end
end

2 changes: 1 addition & 1 deletion exercises/two-bucket/example.tt
Original file line number Diff line number Diff line change
Expand Up @@ -14,6 +14,6 @@ class TwoBucketTest < Minitest::Test<% test_cases.each do |test_case| %>
<%= IO.read(XRUBY_LIB + '/bookkeeping.md') %>
def test_bookkeeping
skip
assert_equal <%= version.next %>, BookKeeping::VERSION
assert_equal <%= version %>, BookKeeping::VERSION
end
end
2 changes: 1 addition & 1 deletion exercises/word-count/example.tt
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,7 @@ class PhraseTest < Minitest::Test<% test_cases.each do |test_case| %>
<%= IO.read(XRUBY_LIB + '/bookkeeping.md') %>
def test_bookkeeping
skip
assert_equal <%= version.next %>, BookKeeping::VERSION
assert_equal <%= version %>, BookKeeping::VERSION
end
end

2 changes: 1 addition & 1 deletion exercises/wordy/example.tt
Original file line number Diff line number Diff line change
Expand Up @@ -12,6 +12,6 @@ class WordyTest < Minitest::Test<% test_cases.each do |test_case| %>
<%= IO.read(XRUBY_LIB + '/bookkeeping.md') %>
def test_bookkeeping
skip
assert_equal <%= version.next %>, BookKeeping::VERSION
assert_equal <%= version %>, BookKeeping::VERSION
end
end
6 changes: 1 addition & 5 deletions lib/generator/template_values.rb
Original file line number Diff line number Diff line change
Expand Up @@ -22,14 +22,10 @@ def template_values
require 'json'
require cases_require_name

# Compensate for the version.next that appears in template files.
# TODO: remove the .next from the template files and remove compensation
compensated_version = version - 1

TemplateValues.new(
# TODO: rename sha1 to abbreviated_commit_hash
sha1: canonical_data.abbreviated_commit_hash,
version: compensated_version,
version: version,
test_cases: test_cases_proc.call(canonical_data.to_s)
)
end
Expand Down
2 changes: 1 addition & 1 deletion test/fixtures/xruby/exercises/alpha/example.tt
Original file line number Diff line number Diff line change
Expand Up @@ -15,6 +15,6 @@ class AlphaTest < Minitest::Test<% test_cases.each do |test_case| %>
<%= IO.read(XRUBY_LIB + '/bookkeeping.md') %>
def test_bookkeeping
skip
assert_equal <%= version.next %>, BookKeeping::VERSION
assert_equal <%= version %>, BookKeeping::VERSION
end
end