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.11.1 lib/capybara/spec/session/save_and_open_page_spec.rb
capybara-3.11.0 lib/capybara/spec/session/save_and_open_page_spec.rb
capybara-3.10.1 lib/capybara/spec/session/save_and_open_page_spec.rb
capybara-3.10.0 lib/capybara/spec/session/save_and_open_page_spec.rb
capybara-3.9.0 lib/capybara/spec/session/save_and_open_page_spec.rb
capybara-3.8.2 lib/capybara/spec/session/save_and_open_page_spec.rb
capybara-3.8.1 lib/capybara/spec/session/save_and_open_page_spec.rb
capybara-3.8.0 lib/capybara/spec/session/save_and_open_page_spec.rb
capybara-3.7.2 lib/capybara/spec/session/save_and_open_page_spec.rb
capybara-3.7.1 lib/capybara/spec/session/save_and_open_page_spec.rb
capybara-3.7.0 lib/capybara/spec/session/save_and_open_page_spec.rb
capybara-3.6.0 lib/capybara/spec/session/save_and_open_page_spec.rb
capybara-3.5.1 lib/capybara/spec/session/save_and_open_page_spec.rb
capybara-3.5.0 lib/capybara/spec/session/save_and_open_page_spec.rb
capybara-3.4.2 lib/capybara/spec/session/save_and_open_page_spec.rb
capybara-3.4.1 lib/capybara/spec/session/save_and_open_page_spec.rb
capybara-3.4.0 lib/capybara/spec/session/save_and_open_page_spec.rb