Sha256: e5ae6c0c39f154ce219463d528fdb2100df8d96336847456286fd663b7bbabfe
Contents?: true
Size: 1007 Bytes
Versions: 2
Compression:
Stored size: 1007 Bytes
Contents
require 'spec_helper' class ControlScreen include Mohawk window(:id => nil) control(:control_yourself, :id => "controlId") end describe Mohawk::Accessors::Control do let(:screen) { ControlScreen.new } let(:window) { double("RAutomation Window") } let(:control) { double("Control Window") } before(:each) do RAutomation::Window.stub(:new).and_return(window) window.should_receive(:value_control).with(:id => 'controlId').and_return(control) end it "can get the value" do control.should_receive(:value).and_return('expected value') screen.control_yourself_value.should eq('expected value') end it "can set the value" do control.should_receive(:set).with('new value') screen.control_yourself = 'new value' end it "can click the control" do control.should_receive(:click) screen.click_control_yourself end it "can work with the raw view" do screen.control_yourself_view.should be(control) end end
Version data entries
2 entries across 2 versions & 1 rubygems
Version | Path |
---|---|
mohawk-0.0.4 | spec/lib/mohawk/accessors/control_spec.rb |
mohawk-0.0.3 | spec/lib/mohawk/accessors/control_spec.rb |