Sha256: 602a044c494842f2407722b95b4e6c6e5109934e5b7d3688a15b01a7bb25843b
Contents?: true
Size: 1.49 KB
Versions: 2
Compression:
Stored size: 1.49 KB
Contents
require_relative '../spec_helper' class ImageGenerators include Fluent image :logo, id: 'logo' end describe Fluent::Generators do let(:watir_browser) { mock_browser_for_watir } let(:watir_definition) { ImageGenerators.new(watir_browser) } describe 'image generators' do context 'when declared on a page definition' do it 'should generate methods for referencing the image' do watir_definition.should respond_to(:logo_object) watir_definition.should respond_to(:logo_element) watir_definition.should respond_to(:logo_image) end it 'should generate methods for interacting with the image' do watir_definition.should respond_to(:logo_exists?) watir_definition.should respond_to(:logo_visible?) watir_definition.should respond_to(:logo?) watir_definition.should respond_to(:logo_?) watir_definition.should respond_to(:logo_image_exists?) watir_definition.should respond_to(:logo_image_visible?) watir_definition.should respond_to(:logo_image?) watir_definition.should respond_to(:logo_image_?) end end context 'when used by the watir platform' do it 'should locate the image' do watir_browser.should_receive(:image).and_return(watir_browser) web_element = watir_definition.logo_object web_element.should_not be_nil web_element.should be_instance_of Fluent::WebElements::Image end end end end
Version data entries
2 entries across 2 versions & 1 rubygems
Version | Path |
---|---|
fluent-0.4.0 | spec/generators/image_generators_spec.rb |
fluent-0.3.0 | spec/generators/image_generators_spec.rb |