aboutsummaryrefslogtreecommitdiffstats
path: root/guides/source
diff options
context:
space:
mode:
authorT.J. Schuck <tj@getharvest.com>2017-04-18 12:28:34 -0400
committerT.J. Schuck <tj@getharvest.com>2017-04-18 15:43:01 -0400
commit1d82b7ce7c96b86e8ef44b2eba12bccd2bd14331 (patch)
tree8adfd170bc654ba3e4a7b6e3108f76849a618bb0 /guides/source
parent8776a7139757d0b264785c774d4e7f37d4bc1ac7 (diff)
downloadrails-1d82b7ce7c96b86e8ef44b2eba12bccd2bd14331.tar.gz
rails-1d82b7ce7c96b86e8ef44b2eba12bccd2bd14331.tar.bz2
rails-1d82b7ce7c96b86e8ef44b2eba12bccd2bd14331.zip
Explicitly require AS::Time in AS::Testing::TimeHelpers
If you just try to use `ActiveSupport::Testing::TimeHelpers` standalone by requiring `active_support/testing/time_helpers`, you currently get an error: `NoMethodError: undefined method `change' for 2017-12-14 01:04:44 -0500:Time` 9f6e82ee4783e491c20f5244a613fdeb4024beb5 added a dependency on `AS::Time` by using `AS::Time#change`. Here's a script to reproduce the error: ```ruby require "bundler/inline" gemfile(true) do source "https://rubygems.org" gem "activesupport", github: "rails/rails" end require "active_support/testing/time_helpers" require "minitest/autorun" class BugTest < Minitest::Test include ActiveSupport::Testing::TimeHelpers def test_stuff travel_to Time.new(2017, 12, 14, 01, 04, 44) do assert true end end end ``` It currently fails for all 5.x.x versions and master. Ideally, this would be backported to `5-0-stable` and `5-1-stable` as well.
Diffstat (limited to 'guides/source')
0 files changed, 0 insertions, 0 deletions