Sha256: eb785e5391f155ac5bd597ee8aff71b890b45501ddd29662a4b4721c4244c3bd
Contents?: true
Size: 1.28 KB
Versions: 5
Compression:
Stored size: 1.28 KB
Contents
require "spec_helper" describe "Relevance::Tarantula::Form large example" do before do @tag = Hpricot(<<END) <form action="/session" method="post"> <input name="authenticity_token" type="hidden" value="1be0d07c6e13669a87b8f52a3c7e1d1ffa77708d" /> <input id="email" name="email" size="30" type="text" /> <input id="password" name="password" size="30" type="password" /> <input id="remember_me" name="remember_me" type="checkbox" value="1" /> <input name="commit" type="submit" value="Log in" /> </form> END @form = make_form(@tag.at('form')) end it "has an action" do @form.action.should == "/session" end it "has a method" do @form.meth.should == "post" end end describe "A Relevance::Tarantula::Form" do it "defaults method to 'get'" do @tag = Hpricot("<form/>") @form = make_form(@tag.at('form')) @form.meth.should == 'get' end end describe "A Relevance::Tarantula::Form with a hacked _method" do before do @tag = Hpricot(<<END) <form action="/foo"> <input name="authenticity_token" type="hidden" value="1be0d07c6e13669a87b8f52a3c7e1d1ffa77708d" /> <input id="_method" name="_method" size="30" type="text" value="PUT"/> </form> END @form = make_form(@tag.at('form')) end it "has a method" do @form.meth.should == "put" end end
Version data entries
5 entries across 5 versions & 1 rubygems