percy / percy-capybara

Visual testing for Capybara with Percy.
https://docs.percy.io/docs/capybara
MIT License
45 stars 23 forks source link

Fix module path import loading issues. #26

Closed fotinakis closed 7 years ago

fotinakis commented 7 years ago

For one user, sometimes this happens:

undefined method `client' for Percy:Module (NoMethodError)

When they use a custom loader like:

require 'percy/capybara/loaders/sprockets_loader'

class CustomLoader < Percy::Capybara::Loaders::SprocketsLoader
...
end

Percy::Capybara.use_loader(CustomLoader)
Percy::Capybara.initialize_build
at_exit  { Percy::Capybara.finalize_build }