examples/relevance/tarantula/form_example.rb in tarantula-0.2.0 vs examples/relevance/tarantula/form_example.rb in tarantula-0.3.3

- old
+ new

@@ -9,11 +9,11 @@ <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 = Relevance::Tarantula::Form.new(@tag.at('form')) + @form = make_form(@tag.at('form')) end it "has an action" do @form.action.should == "/session" end @@ -25,11 +25,11 @@ end describe "A Relevance::Tarantula::Form" do it "defaults method to 'get'" do @tag = Hpricot("<form/>") - @form = Relevance::Tarantula::Form.new(@tag.at('form')) + @form = make_form(@tag.at('form')) @form.method.should == 'get' end end describe "A Relevance::Tarantula::Form with a hacked _method" do @@ -38,10 +38,10 @@ <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 = Relevance::Tarantula::Form.new(@tag.at('form')) + @form = make_form(@tag.at('form')) end it "has a method" do @form.method.should == "put" end \ No newline at end of file