This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# frozen_string_literal: true | |
# When a feature spec fails it can sometimes be difficult to determine the | |
# cause, here we hook into RSpec and if a feature spec fails we save the | |
# following artifacts to disk: | |
# | |
# - A copy of the HTML of the currently open page. | |
# - A screenshot of the currently open page (if the Capybara driver supports | |
# screenshots). | |
# - A copy of the segment of log/test.log that was generated for the failing |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
const nock = require('nock') | |
// Prevent requests being made to any outside services: | |
nock.disableNetConnect() | |
// Allow requests through to localhost, which is used by SuperTest to send | |
// requests during integration tests: | |
const localhost = '127.0.0.1' | |
nock.enableNetConnect(localhost) |
OlderNewer