2008-10-25 16:22:55 +00:00
|
|
|
require File.expand_path(File.dirname(__FILE__) + "/../../spec_helper")
|
2008-10-23 04:28:36 +00:00
|
|
|
|
|
|
|
module Webrat
|
|
|
|
describe CheckboxField do
|
|
|
|
it "should say it is checked if it is" do
|
2008-11-11 05:28:15 +00:00
|
|
|
checkbox = CheckboxField.new(nil, (Webrat::XML.document("<input type='checkbox' checked='checked'>").search('input')).first)
|
2008-10-23 04:28:36 +00:00
|
|
|
checkbox.should be_checked
|
|
|
|
end
|
|
|
|
|
|
|
|
it "should say it is not checked if it is not" do
|
2008-11-11 05:28:15 +00:00
|
|
|
checkbox = CheckboxField.new(nil, (Webrat::XML.document("<input type='checkbox'>").search('input')).first)
|
2008-10-23 04:28:36 +00:00
|
|
|
checkbox.should_not be_checked
|
|
|
|
end
|
|
|
|
end
|
|
|
|
end
|