Skip to content

Instantly share code, notes, and snippets.

@fotinakis
Created October 3, 2017 22:22
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save fotinakis/05ab9087ca89fb53b34f76d07b0b709a to your computer and use it in GitHub Desktop.
Save fotinakis/05ab9087ca89fb53b34f76d07b0b709a to your computer and use it in GitHub Desktop.
Custom Percy::Capybara SprocketsLoader that changes path
class CustomLoader < Percy::Capybara::Loaders::SprocketsLoader
def build_resources
super.map do |resource|
resource.resource_url = resource.resource_url.gsub('//localhost:3000/', '/')
end
end
end
Percy::Capybara.use_loader(CustomLoader)
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment