Generate UTC time in todo

This commit is contained in:
Vitalii Elenhaupt 2018-09-06 18:48:36 +03:00
parent fd78d17c40
commit 18ac04d992
No known key found for this signature in database
GPG key ID: 7558EF3A4056C706
2 changed files with 5 additions and 1 deletions

View file

@ -31,6 +31,10 @@ module Ameba
create_todo.should contain "# This configuration file was generated by" create_todo.should contain "# This configuration file was generated by"
end end
it "creates a todo with UTC time" do
create_todo.should match /\d{4}-\d{2}-\d{2} \d{2}:\d{2}:\d{2} UTC/
end
it "creates a todo with version" do it "creates a todo with version" do
create_todo.should contain "Ameba version #{VERSION}" create_todo.should contain "Ameba version #{VERSION}"
end end

View file

@ -41,7 +41,7 @@ module Ameba::Formatter
private def header private def header
<<-HEADER <<-HEADER
# This configuration file was generated by `ameba --gen-config` # This configuration file was generated by `ameba --gen-config`
# on #{Time.now} using Ameba version #{VERSION}. # on #{Time.utc_now} using Ameba version #{VERSION}.
# The point is for the user to remove these configuration records # The point is for the user to remove these configuration records
# one by one as the reported problems are removed from the code base. # one by one as the reported problems are removed from the code base.