Skip to content

Commit 849f45a

Browse files
authored
Merge pull request #86 from PlayerData/fix-test-flakes
2 parents 6058aee + b94fbc9 commit 849f45a

2 files changed

Lines changed: 3 additions & 0 deletions

File tree

test/date_validator_test.rb

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -84,6 +84,8 @@ module Validations
8484

8585
it "allows custom validation message to be handled by I18n" do
8686
custom_message = 'Custom Date Message'
87+
88+
I18n.backend.eager_load! if I18n.backend.respond_to?(:eager_load!)
8789
I18n.backend.store_translations('en', { errors: { messages: { not_a_date: custom_message }}})
8890

8991
TestRecord.validates :expiration_date, date: true

test/test_helper.rb

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -12,6 +12,7 @@
1212
require 'minitest/autorun'
1313

1414
require 'active_model'
15+
require 'active_support/core_ext/time/zones'
1516
require 'date_validator'
1617

1718
I18n.load_path += Dir[File.expand_path(File.join(File.dirname(__FILE__), '../config/locales', '*.yml')).to_s]

0 commit comments

Comments
 (0)