spec/spec_helper.rb in storytime-1.2.0 vs spec/spec_helper.rb in storytime-2.0.0

- old
+ new

@@ -13,12 +13,20 @@ # Checks for pending migrations before tests are run. # If you are not using ActiveRecord, you can remove this line. ActiveRecord::Migration.maintain_test_schema! +poltergeist_options = { + phantomjs_logger: Logger.new('/dev/null'), + # inspector: true, + # debug: true, + phantomjs_options: ['--load-images=no', '--ignore-ssl-errors=yes', '--ssl-protocol=TLSv1'], + js_errors: false +} + Capybara.register_driver :poltergeist_st do |app| - Capybara::Poltergeist::Driver.new(app, phantomjs_logger: Logger.new('/dev/null'), phantomjs_options: ['--proxy-type=socks5', '--proxy=0.0.0.0:0', '--load-images=no', '--ignore-ssl-errors=yes']) + Capybara::Poltergeist::Driver.new(app, poltergeist_options) end Capybara.javascript_driver = :poltergeist_st RSpec.configure do |config| @@ -70,9 +78,12 @@ config.order = "random" config.include FeatureMacros, type: :feature config.include Storytime::Engine.routes.url_helpers config.include Devise::TestHelpers, type: :controller + + config.filter_run focus: true + config.run_all_when_everything_filtered = true end def have_image(url) have_xpath("//img[@src='#{url}']") end \ No newline at end of file