Sha256: a883ea637b925cb8c40582ac058c1d777874489236af598a5314555c4ad4ca6f

Contents?: true

Size: 790 Bytes

Versions: 2

Compression:

Stored size: 790 Bytes

Contents

require 'spec_helper'

class RadioScreen
  include Mohawk
  window(:id => nil)

  radio(:radio_radio, :id => "radioId")
end

describe Mohawk::Accessors::Radio do
  let(:screen) { RadioScreen.new }
  let(:window) { double("RAutomation Window") }
  let(:radio_control) { double("Elvis Costello's Radio Radio") }

  before(:each) do
    RAutomation::Window.stub(:new).and_return(window)
    window.should_receive(:radio).with(:id => "radioId").and_return(radio_control)
  end

  context "working with radio controls" do
    it "can set the radio control" do
      radio_control.should_receive(:set)
      screen.radio_radio
    end

    it "knows if the radio is selected" do
      radio_control.should_receive(:set?)
      screen.radio_radio?
    end
  end
end

Version data entries

2 entries across 2 versions & 1 rubygems

Version Path
mohawk-0.0.2 spec/lib/mohawk/accessors/radio_spec.rb
mohawk-0.0.1 spec/lib/mohawk/accessors/radio_spec.rb