(RSpec + Capybara + Poltergeist)
Vlado Cingel / vlado@cingel.hr
Let's fix it quickly ...
# spec/rails_helper.rb
stub_request(:get, 'https://embed-ssl.wistia.com')
stub_request(:get, 'https://fast.wistia.com')
<% unless Rails.env.test? %>
<%= embed_wistia_video %>
<% end %>
https://robots.thoughtbot.com/speed-up-javascript-capybara-specs-by-blacklisting-urls
https://robots.thoughtbot.com/speed-up-javascript-capybara-specs-by-blacklisting-urls
# Gemfile gem "poltergeist", ">= 1.6.0"
# spec/rails_helper.rb RSpec.configure do |config| config.before(:each, js: true) do page.driver.browser.url_blacklist = [ "fonts.googleapis.com", "wistia.com" ] end end