Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Rename 'work_load' to 'workload' #561

Merged
merged 1 commit into from
Apr 21, 2017
Merged
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/anagram/example.tt
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@ require_relative 'anagram'
class AnagramTest < Minitest::Test<% test_cases.each do |test_case| %>
def <%= test_case.test_name %>
<%= test_case.skipped %>
<%= test_case.work_load %>
<%= test_case.workload %>
end
<% end %>
<%= IO.read(XRUBY_LIB + '/bookkeeping.md') %>
Expand Down
2 changes: 1 addition & 1 deletion exercises/bowling/example.tt
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,7 @@ class BowlingTest < Minitest::Test
<% test_cases.each do |test_case| %>
def <%= test_case.test_name %>
<%= test_case.skipped %>
<%= test_case.work_load %>
<%= test_case.workload %>
end

<% end %>
Expand Down
4 changes: 2 additions & 2 deletions exercises/hamming/example.tt
Original file line number Diff line number Diff line change
Expand Up @@ -7,8 +7,8 @@ require_relative 'hamming'
class HammingTest < Minitest::Test<% test_cases.each do |test_case| %>
def <%= test_case.name %>
<%= test_case.skipped %><% if test_case.raises_error? %>
assert_raises(ArgumentError) { <%= test_case.work_load %> }<% else %>
assert_equal <%= test_case.expected %>, <%= test_case.work_load %><% end %>
assert_raises(ArgumentError) { <%= test_case.workload %> }<% else %>
assert_equal <%= test_case.expected %>, <%= test_case.workload %><% end %>
end
<% end %>
<%= IO.read(XRUBY_LIB + '/bookkeeping.md') %>
Expand Down
2 changes: 1 addition & 1 deletion exercises/rna-transcription/example.tt
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@ require_relative 'rna_transcription'
class ComplementTest < Minitest::Test<% test_cases.each do |test_case| %>
def <%= test_case.test_name %>
<%= test_case.skipped %>
assert_equal '<%= test_case.expected %>', <%= test_case.work_load %>
assert_equal '<%= test_case.expected %>', <%= test_case.workload %>
end
<% end %>
<%= IO.read(XRUBY_LIB + '/bookkeeping.md') %>
Expand Down
2 changes: 1 addition & 1 deletion lib/anagram_cases.rb
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@ def test_name
'test_%s' % description.gsub(/[ -]/, '_')
end

def work_load
def workload
indent_lines([show_comment, detector, anagram, assert].compact)
end

Expand Down
6 changes: 3 additions & 3 deletions lib/binary_cases.rb
Original file line number Diff line number Diff line change
Expand Up @@ -16,14 +16,14 @@ def skipped
private

def error_assertion
"assert_raises(ArgumentError) { #{work_load} }"
"assert_raises(ArgumentError) { #{workload} }"
end

def equality_assertion
"assert_equal #{expected}, #{work_load}"
"assert_equal #{expected}, #{workload}"
end

def work_load
def workload
"Binary.to_decimal('#{binary}')"
end

Expand Down
2 changes: 1 addition & 1 deletion lib/bowling_cases.rb
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@ def skipped
index.zero? ? '# skip' : 'skip'
end

def work_load
def workload
indent_lines(assert)
end

Expand Down
2 changes: 1 addition & 1 deletion lib/hamming_cases.rb
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@ def name
'test_%s' % description.gsub(/[ -]/, '_')
end

def work_load
def workload
"Hamming.compute('#{strand1}', '#{strand2}')"
end

Expand Down
2 changes: 1 addition & 1 deletion lib/rna_transcription_cases.rb
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@ def test_name
'test_%s' % description.gsub(/[ -]/, '_')
end

def work_load
def workload
"Complement.of_dna('#{dna}')"
end

Expand Down