summaryrefslogtreecommitdiff
path: root/spec/support/helpers/javascript_fixtures_helpers.rb
diff options
context:
space:
mode:
Diffstat (limited to 'spec/support/helpers/javascript_fixtures_helpers.rb')
-rw-r--r--spec/support/helpers/javascript_fixtures_helpers.rb4
1 files changed, 3 insertions, 1 deletions
diff --git a/spec/support/helpers/javascript_fixtures_helpers.rb b/spec/support/helpers/javascript_fixtures_helpers.rb
index 40eb46878ad..403456fa48e 100644
--- a/spec/support/helpers/javascript_fixtures_helpers.rb
+++ b/spec/support/helpers/javascript_fixtures_helpers.rb
@@ -24,7 +24,9 @@ module JavaScriptFixturesHelpers
# pick an arbitrary date from the past, so tests are not time dependent
# Also see spec/frontend/__helpers__/fake_date/jest.js
- travel_to(Time.utc(2015, 7, 3, 10)) { example.run }
+ travel_to Time.utc(2015, 7, 3, 10)
+ example.run
+ travel_back
raise NoMethodError.new('You need to set `response` for the fixture generator! This will automatically happen with `type: :controller` or `type: :request`.', 'response') unless respond_to?(:response)