Sha256: d281c496234457d9e8b2719a701a62d7e7c85e799ce741c560071b891a0ef277

Contents?: true

Size: 807 Bytes

Versions: 2

Compression:

Stored size: 807 Bytes

Contents

require 'spec_helper'

describe Symbiont::WebObjects::Radio do
  describe "implementation" do
    let(:radio_object) { double('radio_object') }
    let(:radio) { Symbiont::WebObjects::Radio.new(radio_object) }

    it "should register with a radio type" do
      ::Symbiont::WebObjects.get_class_for(:input, :radio).should == ::Symbiont::WebObjects::Radio
    end

    it "should be able to select a radio" do
      radio_object.should_receive(:set).and_return(true)
      radio.select
    end

    it "should be able to clear a radio" do
      radio_object.should_receive(:clear).and_return(true)
      radio.clear
    end

    it "should be able to see if a radio is selected" do
      radio_object.should_receive(:set?).and_return(true)
      radio.selected?
    end
  end
end

Version data entries

2 entries across 2 versions & 1 rubygems

Version Path
symbiont-0.2.1 spec/symbiont/web_objects/radio_spec.rb
symbiont-0.2.0 spec/symbiont/web_objects/radio_spec.rb