public
Description: Webrat - Ruby Acceptance Testing for Web applications
Homepage: http://gitrdoc.com/brynary/webrat/tree/master/
Clone URL: git://github.com/brynary/webrat.git
Adding example for clicking a link with an amperstand
brynary (author)
Tue Nov 18 17:41:14 -0800 2008
commit  5a9c048dfb53c25ed94ccc1e74c756c32cd01bb4
tree    4037340c121b8ade0704c2f05496eb69c185a36d
parent  dc52f07a9f9b8debfd1562c9c119154dd8856e27
...
5
6
7
 
 
 
 
 
 
 
 
8
9
10
...
5
6
7
8
9
10
11
12
13
14
15
16
17
18
0
@@ -5,6 +5,14 @@ describe "click_link" do
0
     @session = Webrat::TestSession.new
0
   end
0
 
0
+  it "should click links with ampertands" do
0
+    @session.response_body = <<-EOS
0
+      <a href="/page">Save &amp; go back</a>
0
+    EOS
0
+    @session.should_receive(:get).with("/page", {})
0
+    @session.click_link "Save & go back"
0
+  end
0
+  
0
   it "should use get by default" do
0
     @session.response_body = <<-EOS
0
       <a href="/page">Link text</a>

Comments