Sha256: 3b86f63d580bb71a18f944f4af2c60c305552616a9cbfb8d6d7c51cd36eb0df3

Contents?: true

Size: 739 Bytes

Versions: 9

Compression:

Stored size: 739 Bytes

Contents

require 'spec_helper'

class LabelScreen
	include Mohawk
	
	window(:title => nil)
	label(:label_control, :id => "labelID")
end

describe Mohawk::Accessors::Label do
	let(:screen) { LabelScreen.new }
	let(:window) { double("RAutomation Window") }
	let(:label_control) { double("Label Control") }
	
	before(:each) do
		RAutomation::Window.stub(:new).and_return(window)
		window.should_receive(:label).with(:id => "labelID").and_return(label_control)
	end
	
	it "can retrieve the label value" do
		label_control.should_receive(:value).and_return("some string")
		screen.label_control.should eq("some string")
	end

  it "can dish out the view" do
    screen.label_control_view.should eq(label_control)
  end

end

Version data entries

9 entries across 9 versions & 1 rubygems

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