Commit c6beeec4bde8f9f03cd18772bc092d87e827230b
Exists in
colab
and in
4 other branches
Merge pull request #253 from mezuro/fix_helper_name
Fixes the orthography for elapsed time on ProcessingHelper
Showing
3 changed files
with
4 additions
and
4 deletions
Show diff stats
app/helpers/processings_helper.rb
1 | module ProcessingsHelper | 1 | module ProcessingsHelper |
2 | - def humanize_eplased_time duration_in_seconds | 2 | + def humanize_elapsed_time duration_in_seconds |
3 | distance_of_time_in_words(Time.now, duration_in_seconds.seconds.from_now) | 3 | distance_of_time_in_words(Time.now, duration_in_seconds.seconds.from_now) |
4 | end | 4 | end |
5 | 5 |
app/views/repositories/_processing_information.html.erb
@@ -12,7 +12,7 @@ | @@ -12,7 +12,7 @@ | ||
12 | <% @processing.process_times.each do |process_time| %> | 12 | <% @processing.process_times.each do |process_time| %> |
13 | <p> | 13 | <p> |
14 | <strong><%= process_time.state %> time:</strong> | 14 | <strong><%= process_time.state %> time:</strong> |
15 | - <%= humanize_eplased_time(process_time.time) %> | 15 | + <%= humanize_elapsed_time(process_time.time) %> |
16 | </p> | 16 | </p> |
17 | <% end %> | 17 | <% end %> |
18 | <% end %> | 18 | <% end %> |
19 | \ No newline at end of file | 19 | \ No newline at end of file |
spec/helpers/processings_helper_spec.rb
@@ -5,9 +5,9 @@ def make_range(b, e) | @@ -5,9 +5,9 @@ def make_range(b, e) | ||
5 | end | 5 | end |
6 | 6 | ||
7 | describe ProcessingsHelper, :type => :helper do | 7 | describe ProcessingsHelper, :type => :helper do |
8 | - describe 'humanize_eplased_time' do | 8 | + describe 'humanize_elapsed_time' do |
9 | it 'should convert it to readable words' do | 9 | it 'should convert it to readable words' do |
10 | - expect(helper.humanize_eplased_time(6)).to eq('less than a minute') | 10 | + expect(helper.humanize_elapsed_time(6)).to eq('less than a minute') |
11 | end | 11 | end |
12 | end | 12 | end |
13 | 13 |