Skip to content

Commit

Permalink
Use Date.current instead of Date.today
Browse files Browse the repository at this point in the history
  • Loading branch information
leandroalemao committed Apr 14, 2016
1 parent 5094590 commit 8db8df9
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 2 deletions.
2 changes: 1 addition & 1 deletion app/helpers/date_time_helper.rb
Original file line number Diff line number Diff line change
Expand Up @@ -46,7 +46,7 @@ def api_date_format(date_time)
end
end

def to_be_debated_on_in_words(date, today = Date.today)
def to_be_debated_on_in_words(date, today = Date.current)
return unless date.present?

scope = :"petitions.to_be_debated_on_in_words"
Expand Down
2 changes: 1 addition & 1 deletion spec/helpers/date_time_helper_spec.rb
Original file line number Diff line number Diff line change
Expand Up @@ -119,7 +119,7 @@
end

context "when the date is today" do
let(:date) { Date.today }
let(:date) { Date.current }

it "returns 'To be debated today'" do
expect(helper.to_be_debated_on_in_words(date)).to eq("To be debated today")
Expand Down

0 comments on commit 8db8df9

Please sign in to comment.