Created
October 3, 2017 22:22
-
-
Save fotinakis/05ab9087ca89fb53b34f76d07b0b709a to your computer and use it in GitHub Desktop.
Custom Percy::Capybara SprocketsLoader that changes path
This file contains hidden or 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
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