Sha256: 55fabc1dfc6c6c5651fe35f10ab1f67867cfdfb6602c128c9002c0626c431bb7
Contents?: true
Size: 1.17 KB
Versions: 6
Compression:
Stored size: 1.17 KB
Contents
require 'kookaburra/ui_driver' require 'support/shared_examples/it_has_a_dependency_accessor' require 'support/shared_examples/it_can_make_assertions' require 'support/shared_examples/it_can_have_ui_components' describe Kookaburra::UIDriver do it_behaves_like :it_can_have_ui_components, Kookaburra::UIDriver describe '.ui_driver' do it 'adds an accessor method for the named driver that defaults to an instance of the specified class' do foo_driver_class = double(Class) foo_driver_class.should_receive(:new) \ .with(:configuration) \ .and_return(:a_foo_driver) ui_driver_class = Class.new(Kookaburra::UIDriver) do ui_driver :foo, foo_driver_class end ui = ui_driver_class.new(:configuration) ui.foo.should == :a_foo_driver end end describe '#url' do it 'returns the configured app_host' do config = double('Configuration', :app_host => 'http://my.example.com') driver = Kookaburra::UIDriver.new(config) driver.url.should == 'http://my.example.com' end end it_behaves_like :it_can_make_assertions do let(:subject) { Kookaburra::UIDriver.new(double('Configuration')) } end end
Version data entries
6 entries across 6 versions & 1 rubygems