Commit 314ebb6cd54e2169c64258f3e362062f3b7da388
1 parent
8ecbb86e
Exists in
master
and in
3 other branches
Fixed ActiveRecord 3 test
Showing
2 changed files
with
2 additions
and
1 deletions
Show diff stats
Rakefile
@@ -5,6 +5,7 @@ task default: :test | @@ -5,6 +5,7 @@ task default: :test | ||
5 | Rake::TestTask.new do |t| | 5 | Rake::TestTask.new do |t| |
6 | t.libs << "test" | 6 | t.libs << "test" |
7 | t.test_files = FileList["test/**/*_test.rb"].exclude(/redshift/) | 7 | t.test_files = FileList["test/**/*_test.rb"].exclude(/redshift/) |
8 | + t.warning = false | ||
8 | end | 9 | end |
9 | 10 | ||
10 | namespace :test do | 11 | namespace :test do |
test/test_helper.rb
@@ -229,7 +229,7 @@ module TestDatabase | @@ -229,7 +229,7 @@ module TestDatabase | ||
229 | Time.zone = pt | 229 | Time.zone = pt |
230 | today = Date.today | 230 | today = Date.today |
231 | create_user today.to_s | 231 | create_user today.to_s |
232 | - this_month = today.in_time_zone(pt).beginning_of_month | 232 | + this_month = pt.parse(today.to_s).beginning_of_month |
233 | last_month = this_month - 1.month | 233 | last_month = this_month - 1.month |
234 | expected = { | 234 | expected = { |
235 | last_month.to_date => 0, | 235 | last_month.to_date => 0, |