Sha256: f554fd08541b4ac65d59465863338c249ec87f68f45ce5d96acd6af97250b499

Contents?: true

Size: 433 Bytes

Versions: 97

Compression:

Stored size: 433 Bytes

Contents

# frozen_string_literal: true

require 'launchy'

Capybara::SpecHelper.spec '#save_and_open_page' do
  before do
    @session.visit '/foo'
  end

  after do
    Dir.glob('capybara-*.html').each do |file|
      FileUtils.rm(file)
    end
  end

  it 'sends open method to launchy' do
    allow(Launchy).to receive(:open)
    @session.save_and_open_page
    expect(Launchy).to have_received(:open).with(/capybara-\d+\.html/)
  end
end

Version data entries

97 entries across 83 versions & 5 rubygems

Version Path
capybara-3.20.1 lib/capybara/spec/session/save_and_open_page_spec.rb
capybara-3.20.0 lib/capybara/spec/session/save_and_open_page_spec.rb
capybara-3.19.1 lib/capybara/spec/session/save_and_open_page_spec.rb
capybara-3.19.0 lib/capybara/spec/session/save_and_open_page_spec.rb
capybara-3.18.0 lib/capybara/spec/session/save_and_open_page_spec.rb
capybara-3.15.1 lib/capybara/spec/session/save_and_open_page_spec.rb
capybara-3.17.0 lib/capybara/spec/session/save_and_open_page_spec.rb
capybara-3.16.2 lib/capybara/spec/session/save_and_open_page_spec.rb
tdiary-5.0.13 vendor/bundle/gems/capybara-3.15.0/lib/capybara/spec/session/save_and_open_page_spec.rb
capybara-3.16.1 lib/capybara/spec/session/save_and_open_page_spec.rb
tdiary-5.0.12.1 vendor/bundle/gems/capybara-3.15.0/lib/capybara/spec/session/save_and_open_page_spec.rb
capybara-3.16.0 lib/capybara/spec/session/save_and_open_page_spec.rb
capybara-3.15.0 lib/capybara/spec/session/save_and_open_page_spec.rb
capybara-3.14.0 lib/capybara/spec/session/save_and_open_page_spec.rb
capybara-3.13.2 lib/capybara/spec/session/save_and_open_page_spec.rb
capybara-3.13.1 lib/capybara/spec/session/save_and_open_page_spec.rb
capybara-3.13.0 lib/capybara/spec/session/save_and_open_page_spec.rb
tdiary-5.0.11 vendor/bundle/gems/capybara-3.6.0/lib/capybara/spec/session/save_and_open_page_spec.rb
tdiary-5.0.11 vendor/bundle/gems/capybara-3.12.0/lib/capybara/spec/session/save_and_open_page_spec.rb
capybara-3.12.0 lib/capybara/spec/session/save_and_open_page_spec.rb