require "../spec_helper"
WebMock.stub(:get, "example.com/form/button").to_return(body:
<<-BODY
page_title
BODY
)
describe "Form Fields CheckBox" do
agent = Mechanize.new
page = agent.get("http://example.com/form/button")
form = page.forms[0]
it "returns buttons" do
form.buttons.size.should eq 2
end
it "can be found by button_with method" do
button2 = form.button_with({"class" => "sndButton"})
button2.value.should eq "sndButtonValue"
end
end