Sha256: 51e541636e26e8b5f74826a9328ebd31a3868b437340ed144a34e4c5d296a607

Contents?: true

Size: 526 Bytes

Versions: 2

Compression:

Stored size: 526 Bytes

Contents

require 'spec_helper'
require 'kookaburra/ui_driver/scoped_browser'

describe Kookaburra::UIDriver::ScopedBrowser do
  it 'forwards all method calls to the browser but scopes them to the component locator' do
    browser = double('Browser')
    expect(browser).to receive(:within).with('#a_component_locator').and_yield
    expect(browser).to receive(:some_other_method).with(:foo)
    subject = Kookaburra::UIDriver::ScopedBrowser.new(browser, lambda { '#a_component_locator' })
    subject.some_other_method(:foo)
  end
end

Version data entries

2 entries across 2 versions & 1 rubygems

Version Path
kookaburra-3.0.1 spec/kookaburra/ui_driver/scoped_browser_spec.rb
kookaburra-3.0.0 spec/kookaburra/ui_driver/scoped_browser_spec.rb