From 93b544f085528d1ddeaff807e2bafbfb190ac548 Mon Sep 17 00:00:00 2001 From: Rafael Reggiani Manzo Date: Tue, 14 Jul 2015 11:04:46 -0300 Subject: [PATCH] Fixes the orthography for elapsed time on ProcessingHelper --- app/helpers/processings_helper.rb | 2 +- app/views/repositories/_processing_information.html.erb | 2 +- spec/helpers/processings_helper_spec.rb | 4 ++-- 3 files changed, 4 insertions(+), 4 deletions(-) diff --git a/app/helpers/processings_helper.rb b/app/helpers/processings_helper.rb index bd6d48b..3721dfb 100644 --- a/app/helpers/processings_helper.rb +++ b/app/helpers/processings_helper.rb @@ -1,5 +1,5 @@ module ProcessingsHelper - def humanize_eplased_time duration_in_seconds + def humanize_elapsed_time duration_in_seconds distance_of_time_in_words(Time.now, duration_in_seconds.seconds.from_now) end diff --git a/app/views/repositories/_processing_information.html.erb b/app/views/repositories/_processing_information.html.erb index 7a6e44d..a84f47f 100644 --- a/app/views/repositories/_processing_information.html.erb +++ b/app/views/repositories/_processing_information.html.erb @@ -12,7 +12,7 @@ <% @processing.process_times.each do |process_time| %>

<%= process_time.state %> time: - <%= humanize_eplased_time(process_time.time) %> + <%= humanize_elapsed_time(process_time.time) %>

<% end %> <% end %> \ No newline at end of file diff --git a/spec/helpers/processings_helper_spec.rb b/spec/helpers/processings_helper_spec.rb index aee23e5..c4fb995 100644 --- a/spec/helpers/processings_helper_spec.rb +++ b/spec/helpers/processings_helper_spec.rb @@ -5,9 +5,9 @@ def make_range(b, e) end describe ProcessingsHelper, :type => :helper do - describe 'humanize_eplased_time' do + describe 'humanize_elapsed_time' do it 'should convert it to readable words' do - expect(helper.humanize_eplased_time(6)).to eq('less than a minute') + expect(helper.humanize_elapsed_time(6)).to eq('less than a minute') end end -- libgit2 0.21.2