summaryrefslogtreecommitdiff
path: root/spec/support/capybara_helpers.rb
diff options
context:
space:
mode:
Diffstat (limited to 'spec/support/capybara_helpers.rb')
-rw-r--r--spec/support/capybara_helpers.rb8
1 files changed, 8 insertions, 0 deletions
diff --git a/spec/support/capybara_helpers.rb b/spec/support/capybara_helpers.rb
index 9b5c3065eed..b57a3493aff 100644
--- a/spec/support/capybara_helpers.rb
+++ b/spec/support/capybara_helpers.rb
@@ -27,6 +27,14 @@ module CapybaraHelpers
end
end
end
+
+ # Refresh the page. Calling `visit current_url` doesn't seem to work consistently.
+ #
+ def refresh
+ url = current_url
+ visit 'about:blank'
+ visit url
+ end
end
RSpec.configure do |config|