Sha256: f059ef8c3f7540c37d6fc9dadbef86d4e085f9e6ad77dbd3242ad7b9eb396d26
Contents?: true
Size: 1.33 KB
Versions: 2
Compression:
Stored size: 1.33 KB
Contents
require 'spec_helper' require 'kookaburra/ui_driver/ui_component/address_bar' describe Kookaburra::UIDriver::UIComponent::AddressBar do describe '#go_to' do let(:browser) { double('Capybara::Session', text: '').tap do |b| allow(b).to receive(:visit).with('http://site.example.com') end } let(:error_detector) { nil } let(:configuration) { double('Configuration', :browser => browser, :app_host => nil, :server_error_detection => error_detector) } let(:address_bar) { address_bar = Kookaburra::UIDriver::UIComponent::AddressBar.new(configuration) } context 'when given a string' do it 'causes the browser to navigate to the (presumably URL) string' do address_bar.go_to 'http://site.example.com' end end context 'when given an addressable object' do it "causes the browser to navigate to the object's #url" do addressable = double('addressable', :url => 'http://site.example.com') address_bar.go_to addressable end end context "when a server error would be detected" do let(:error_detector) { ->(browser) { true } } it 'raises a Kookaburra::UnexpectedResponse' do expect { address_bar.go_to 'http://site.example.com' } \ .to raise_error(Kookaburra::UnexpectedResponse) end end end end
Version data entries
2 entries across 2 versions & 1 rubygems
Version | Path |
---|---|
kookaburra-3.0.1 | spec/kookaburra/ui_driver/ui_component/address_bar_spec.rb |
kookaburra-3.0.0 | spec/kookaburra/ui_driver/ui_component/address_bar_spec.rb |