Sha256: d9aab2fed5cb8210ae62e1904816e266453314fd705e5b07a92f7e1f4e3d3d7d

Contents?: true

Size: 876 Bytes

Versions: 3

Compression:

Stored size: 876 Bytes

Contents

require 'spec_helper'

describe Symbiont::WebObjects::CheckBox do
  describe "implementation" do
    let(:checkbox_object) { double('checkbox_object') }
    let(:checkbox_definition) { Symbiont::WebObjects::CheckBox.new(checkbox_object) }
    
    it "should register with a submit type" do
      ::Symbiont::WebObjects.get_class_for(:input, :checkbox).should == ::Symbiont::WebObjects::CheckBox
    end
    
    it "should be able to check the definition" do
      checkbox_object.should_receive(:set)
      checkbox_definition.check
    end
    
    it "should be able to uncheck the definition" do
      checkbox_object.should_receive(:clear)
      checkbox_definition.uncheck
    end
    
    it "should be able to determine if the definition is checked" do
      checkbox_object.should_receive(:set?).and_return(true)
      checkbox_definition.checked?
    end
  end
end

Version data entries

3 entries across 3 versions & 1 rubygems

Version Path
symbiont-0.1.9 spec/symbiont/web_objects/checkbox_spec.rb
symbiont-0.1.8 spec/symbiont/web_objects/checkbox_spec.rb
symbiont-0.1.7 spec/symbiont/web_objects/checkbox_spec.rb