Sha256: 536621773c85e6860ebeacc7db4ec6baabc1ed0372dcc4e7db2eb9d48edeee27
Contents?: true
Size: 898 Bytes
Versions: 1
Compression:
Stored size: 898 Bytes
Contents
require 'spec_helper' require 'page-object/elements' describe PageObject::Elements::Video do let(:video) { PageObject::Elements::Video.new(platform, :platform => :watir_webdriver) } let(:platform) { double('platform')} let(:wd) { double('wd') } before do allow(platform).to receive(:wd).and_return wd end it "should return height when present" do expect(wd).to receive(:size).and_return('height' => 20) expect(video.height).to eq(20) end it "should not return height when not present" do expect(wd).to receive(:size).and_return({}) expect(video.height).to eq(nil) end it "should return width when present" do expect(wd).to receive(:size).and_return('width' => 20) expect(video.width).to eq(20) end it "should not return width when not present" do expect(wd).to receive(:size).and_return({}) expect(video.width).to eq(nil) end end
Version data entries
1 entries across 1 versions & 1 rubygems
Version | Path |
---|---|
page-object-1.2.0 | spec/page-object/elements/video_spec.rb |