Sha256: 37b3ca5999bc877b41865f4fde503c83f986d21717aed9f7a2a84fee612e5821

Contents?: true

Size: 857 Bytes

Versions: 9

Compression:

Stored size: 857 Bytes

Contents

require 'spec_helper'

class LinkScreen
  include Mohawk

  window(:title => nil)
  link(:link_control, :id => "linkID")
end

describe Mohawk::Accessors::Link do
  let(:screen) { LinkScreen.new }
  let(:window) { double("RAutomation Window") }
  let(:link_control) { double("Link Control") }

  before(:each) do
    RAutomation::Window.stub(:new).and_return(window)
    window.should_receive(:label).with(:id => "linkID").and_return(link_control)
  end

  it "can retrieve the link text" do
    link_control.should_receive(:value).and_return("some string")
    screen.link_control_text.should eq("some string")
  end

  it "can click on the link" do
    link_control.should_receive(:click)
    screen.click_link_control
  end

  it "can dish out the view" do
    screen.link_control_view.should be(link_control)
  end

end

Version data entries

9 entries across 9 versions & 1 rubygems

Version Path
mohawk-0.1.4 spec/lib/mohawk/accessors/link_spec.rb
mohawk-0.1.0 spec/lib/mohawk/accessors/link_spec.rb
mohawk-0.0.9 spec/lib/mohawk/accessors/link_spec.rb
mohawk-0.0.8 spec/lib/mohawk/accessors/link_spec.rb
mohawk-0.0.7 spec/lib/mohawk/accessors/link_spec.rb
mohawk-0.0.6 spec/lib/mohawk/accessors/link_spec.rb
mohawk-0.0.5 spec/lib/mohawk/accessors/link_spec.rb
mohawk-0.0.4 spec/lib/mohawk/accessors/link_spec.rb
mohawk-0.0.3 spec/lib/mohawk/accessors/link_spec.rb