capybara 1.1.4 → 2.0.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (111) hide show
  1. data/{History.txt → History.md} +138 -0
  2. data/License.txt +22 -0
  3. data/README.md +850 -0
  4. data/lib/capybara/cucumber.rb +2 -5
  5. data/lib/capybara/driver/base.rb +6 -6
  6. data/lib/capybara/driver/node.rb +3 -2
  7. data/lib/capybara/dsl.rb +13 -124
  8. data/lib/capybara/helpers.rb +33 -0
  9. data/lib/capybara/node/actions.rb +16 -30
  10. data/lib/capybara/node/base.rb +56 -13
  11. data/lib/capybara/node/element.rb +18 -30
  12. data/lib/capybara/node/finders.rb +28 -90
  13. data/lib/capybara/node/matchers.rb +121 -73
  14. data/lib/capybara/node/simple.rb +13 -11
  15. data/lib/capybara/query.rb +78 -0
  16. data/lib/capybara/rack_test/browser.rb +27 -39
  17. data/lib/capybara/rack_test/driver.rb +13 -3
  18. data/lib/capybara/rack_test/node.rb +31 -2
  19. data/lib/capybara/result.rb +72 -0
  20. data/lib/capybara/rspec/features.rb +4 -1
  21. data/lib/capybara/rspec/matchers.rb +33 -63
  22. data/lib/capybara/rspec.rb +7 -4
  23. data/lib/capybara/selector.rb +97 -34
  24. data/lib/capybara/selenium/driver.rb +15 -62
  25. data/lib/capybara/selenium/node.rb +14 -21
  26. data/lib/capybara/server.rb +32 -27
  27. data/lib/capybara/session.rb +90 -50
  28. data/lib/capybara/spec/fixtures/another_test_file.txt +1 -0
  29. data/lib/capybara/spec/public/jquery-ui.js +791 -0
  30. data/lib/capybara/spec/public/jquery.js +9046 -0
  31. data/lib/capybara/spec/public/test.js +3 -0
  32. data/lib/capybara/spec/session/all_spec.rb +61 -59
  33. data/lib/capybara/spec/session/assert_selector.rb +123 -0
  34. data/lib/capybara/spec/session/attach_file_spec.rb +72 -55
  35. data/lib/capybara/spec/session/body_spec.rb +21 -0
  36. data/lib/capybara/spec/session/check_spec.rb +68 -48
  37. data/lib/capybara/spec/session/choose_spec.rb +32 -18
  38. data/lib/capybara/spec/session/click_button_spec.rb +263 -232
  39. data/lib/capybara/spec/session/click_link_or_button_spec.rb +40 -29
  40. data/lib/capybara/spec/session/click_link_spec.rb +96 -96
  41. data/lib/capybara/spec/session/current_url_spec.rb +88 -10
  42. data/lib/capybara/spec/session/evaluate_script_spec.rb +6 -0
  43. data/lib/capybara/spec/session/execute_script_spec.rb +7 -0
  44. data/lib/capybara/spec/session/fill_in_spec.rb +119 -103
  45. data/lib/capybara/spec/session/find_button_spec.rb +16 -14
  46. data/lib/capybara/spec/session/find_by_id_spec.rb +16 -14
  47. data/lib/capybara/spec/session/find_field_spec.rb +23 -21
  48. data/lib/capybara/spec/session/find_link_spec.rb +15 -14
  49. data/lib/capybara/spec/session/find_spec.rb +93 -115
  50. data/lib/capybara/spec/session/first_spec.rb +51 -85
  51. data/lib/capybara/spec/session/has_button_spec.rb +22 -24
  52. data/lib/capybara/spec/session/has_css_spec.rb +190 -205
  53. data/lib/capybara/spec/session/has_field_spec.rb +170 -144
  54. data/lib/capybara/spec/session/has_link_spec.rb +26 -29
  55. data/lib/capybara/spec/session/has_select_spec.rb +161 -109
  56. data/lib/capybara/spec/session/has_selector_spec.rb +94 -100
  57. data/lib/capybara/spec/session/has_table_spec.rb +22 -88
  58. data/lib/capybara/spec/session/has_text_spec.rb +195 -0
  59. data/lib/capybara/spec/session/has_xpath_spec.rb +100 -96
  60. data/lib/capybara/spec/session/headers.rb +4 -17
  61. data/lib/capybara/spec/session/html_spec.rb +15 -0
  62. data/lib/capybara/spec/session/node_spec.rb +205 -0
  63. data/lib/capybara/spec/session/reset_session_spec.rb +42 -0
  64. data/lib/capybara/spec/session/response_code.rb +4 -17
  65. data/lib/capybara/spec/session/save_page_spec.rb +46 -0
  66. data/lib/capybara/spec/session/screenshot.rb +13 -0
  67. data/lib/capybara/spec/session/select_spec.rb +99 -88
  68. data/lib/capybara/spec/session/source_spec.rb +12 -0
  69. data/lib/capybara/spec/session/text_spec.rb +15 -12
  70. data/lib/capybara/spec/session/uncheck_spec.rb +22 -17
  71. data/lib/capybara/spec/session/unselect_spec.rb +69 -58
  72. data/lib/capybara/spec/session/visit_spec.rb +74 -0
  73. data/lib/capybara/spec/session/within_frame_spec.rb +31 -0
  74. data/lib/capybara/spec/session/within_spec.rb +118 -131
  75. data/lib/capybara/spec/session/within_window_spec.rb +38 -0
  76. data/lib/capybara/spec/spec_helper.rb +84 -0
  77. data/lib/capybara/spec/test_app.rb +32 -6
  78. data/lib/capybara/spec/views/form.erb +12 -10
  79. data/lib/capybara/spec/views/host_links.erb +2 -2
  80. data/lib/capybara/spec/views/tables.erb +6 -66
  81. data/lib/capybara/spec/views/with_html.erb +9 -4
  82. data/lib/capybara/spec/views/with_js.erb +11 -7
  83. data/lib/capybara/version.rb +1 -1
  84. data/lib/capybara.rb +125 -6
  85. data/spec/basic_node_spec.rb +17 -5
  86. data/spec/capybara_spec.rb +9 -0
  87. data/spec/dsl_spec.rb +31 -17
  88. data/spec/rack_test_spec.rb +157 -0
  89. data/spec/result_spec.rb +51 -0
  90. data/spec/rspec/features_spec.rb +19 -2
  91. data/spec/rspec/matchers_spec.rb +170 -89
  92. data/spec/rspec_spec.rb +1 -3
  93. data/spec/selenium_spec.rb +53 -0
  94. data/spec/server_spec.rb +37 -25
  95. data/spec/spec_helper.rb +1 -30
  96. metadata +39 -31
  97. data/README.rdoc +0 -722
  98. data/lib/capybara/spec/driver.rb +0 -301
  99. data/lib/capybara/spec/session/current_host_spec.rb +0 -68
  100. data/lib/capybara/spec/session/has_content_spec.rb +0 -106
  101. data/lib/capybara/spec/session/javascript.rb +0 -306
  102. data/lib/capybara/spec/session.rb +0 -154
  103. data/lib/capybara/util/save_and_open_page.rb +0 -44
  104. data/lib/capybara/util/timeout.rb +0 -27
  105. data/spec/driver/rack_test_driver_spec.rb +0 -89
  106. data/spec/driver/selenium_driver_spec.rb +0 -37
  107. data/spec/save_and_open_page_spec.rb +0 -155
  108. data/spec/session/rack_test_session_spec.rb +0 -55
  109. data/spec/session/selenium_session_spec.rb +0 -26
  110. data/spec/string_spec.rb +0 -77
  111. data/spec/timeout_spec.rb +0 -28
@@ -1,192 +1,218 @@
1
- shared_examples_for "has_field" do
2
- describe '#has_field' do
3
- before { @session.visit('/form') }
4
-
5
- it "should be true if the field is on the page" do
6
- @session.should have_field('Dog')
7
- @session.should have_field('form_description')
8
- @session.should have_field('Region')
9
- end
1
+ Capybara::SpecHelper.spec '#has_field' do
2
+ before { @session.visit('/form') }
3
+
4
+ it "should be true if the field is on the page" do
5
+ @session.should have_field('Dog')
6
+ @session.should have_field('form_description')
7
+ @session.should have_field('Region')
8
+ @session.should have_field(:'Region')
9
+ end
10
+
11
+ it "should be false if the field is not on the page" do
12
+ @session.should_not have_field('Monkey')
13
+ end
10
14
 
11
- it "should be false if the field is not on the page" do
12
- @session.should_not have_field('Monkey')
15
+ context 'with value' do
16
+ it "should be true if a field with the given value is on the page" do
17
+ @session.should have_field('First Name', :with => 'John')
18
+ @session.should have_field('Phone', :with => '+1 555 7021')
19
+ @session.should have_field('Street', :with => 'Sesame street 66')
20
+ @session.should have_field('Description', :with => 'Descriptive text goes here')
13
21
  end
14
22
 
15
- context 'with value' do
16
- it "should be true if a field with the given value is on the page" do
17
- @session.should have_field('First Name', :with => 'John')
18
- @session.should have_field('Phone', :with => '+1 555 7021')
19
- @session.should have_field('Street', :with => 'Sesame street 66')
20
- @session.should have_field('Description', :with => 'Descriptive text goes here')
21
- end
22
-
23
- it "should be false if the given field is not on the page" do
24
- @session.should_not have_field('First Name', :with => 'Peter')
25
- @session.should_not have_field('Wrong Name', :with => 'John')
26
- @session.should_not have_field('Description', :with => 'Monkey')
27
- end
28
-
29
- it "should be true after the field has been filled in with the given value" do
30
- @session.fill_in('First Name', :with => 'Jonas')
31
- @session.should have_field('First Name', :with => 'Jonas')
32
- end
33
-
34
- it "should be false after the field has been filled in with a different value" do
35
- @session.fill_in('First Name', :with => 'Jonas')
36
- @session.should_not have_field('First Name', :with => 'John')
37
- end
23
+ it "should be false if the given field is not on the page" do
24
+ @session.should_not have_field('First Name', :with => 'Peter')
25
+ @session.should_not have_field('Wrong Name', :with => 'John')
26
+ @session.should_not have_field('Description', :with => 'Monkey')
38
27
  end
39
- end
40
28
 
41
- describe '#has_no_field' do
42
- before { @session.visit('/form') }
29
+ it "should be true after the field has been filled in with the given value" do
30
+ @session.fill_in('First Name', :with => 'Jonas')
31
+ @session.should have_field('First Name', :with => 'Jonas')
32
+ end
43
33
 
44
- it "should be false if the field is on the page" do
45
- @session.should_not have_no_field('Dog')
46
- @session.should_not have_no_field('form_description')
47
- @session.should_not have_no_field('Region')
34
+ it "should be false after the field has been filled in with a different value" do
35
+ @session.fill_in('First Name', :with => 'Jonas')
36
+ @session.should_not have_field('First Name', :with => 'John')
48
37
  end
38
+ end
49
39
 
50
- it "should be true if the field is not on the page" do
51
- @session.should have_no_field('Monkey')
40
+ context 'with type' do
41
+ it "should be true if a field with the given type is on the page" do
42
+ @session.should have_field('First Name', :type => 'text')
43
+ @session.should have_field('Html5 Email', :type => 'email')
44
+ @session.should have_field('Html5 Tel', :type => 'tel')
52
45
  end
53
46
 
54
- context 'with value' do
55
- it "should be false if a field with the given value is on the page" do
56
- @session.should_not have_no_field('First Name', :with => 'John')
57
- @session.should_not have_no_field('Phone', :with => '+1 555 7021')
58
- @session.should_not have_no_field('Street', :with => 'Sesame street 66')
59
- @session.should_not have_no_field('Description', :with => 'Descriptive text goes here')
60
- end
61
-
62
- it "should be true if the given field is not on the page" do
63
- @session.should have_no_field('First Name', :with => 'Peter')
64
- @session.should have_no_field('Wrong Name', :with => 'John')
65
- @session.should have_no_field('Description', :with => 'Monkey')
66
- end
67
-
68
- it "should be false after the field has been filled in with the given value" do
69
- @session.fill_in('First Name', :with => 'Jonas')
70
- @session.should_not have_no_field('First Name', :with => 'Jonas')
71
- end
72
-
73
- it "should be true after the field has been filled in with a different value" do
74
- @session.fill_in('First Name', :with => 'Jonas')
75
- @session.should have_no_field('First Name', :with => 'John')
76
- end
47
+ it "should be false if the given field is not on the page" do
48
+ @session.should_not have_field('First Name', :type => 'email')
49
+ @session.should_not have_field('Html5 Email', :type => 'tel')
50
+ @session.should_not have_field('Description', :type => '')
77
51
  end
78
52
  end
53
+ end
79
54
 
80
- describe '#has_checked_field?' do
81
- before { @session.visit('/form') }
55
+ Capybara::SpecHelper.spec '#has_no_field' do
56
+ before { @session.visit('/form') }
82
57
 
83
- it "should be true if a checked field is on the page" do
84
- @session.should have_checked_field('gender_female')
85
- @session.should have_checked_field('Hamster')
86
- end
58
+ it "should be false if the field is on the page" do
59
+ @session.should_not have_no_field('Dog')
60
+ @session.should_not have_no_field('form_description')
61
+ @session.should_not have_no_field('Region')
62
+ end
87
63
 
88
- it "should be false if an unchecked field is on the page" do
89
- @session.should_not have_checked_field('form_pets_cat')
90
- @session.should_not have_checked_field('Male')
64
+ it "should be true if the field is not on the page" do
65
+ @session.should have_no_field('Monkey')
66
+ end
67
+
68
+ context 'with value' do
69
+ it "should be false if a field with the given value is on the page" do
70
+ @session.should_not have_no_field('First Name', :with => 'John')
71
+ @session.should_not have_no_field('Phone', :with => '+1 555 7021')
72
+ @session.should_not have_no_field('Street', :with => 'Sesame street 66')
73
+ @session.should_not have_no_field('Description', :with => 'Descriptive text goes here')
91
74
  end
92
75
 
93
- it "should be false if no field is on the page" do
94
- @session.should_not have_checked_field('Does Not Exist')
76
+ it "should be true if the given field is not on the page" do
77
+ @session.should have_no_field('First Name', :with => 'Peter')
78
+ @session.should have_no_field('Wrong Name', :with => 'John')
79
+ @session.should have_no_field('Description', :with => 'Monkey')
95
80
  end
96
81
 
97
- it "should be true after an unchecked checkbox is checked" do
98
- @session.check('form_pets_cat')
99
- @session.should have_checked_field('form_pets_cat')
82
+ it "should be false after the field has been filled in with the given value" do
83
+ @session.fill_in('First Name', :with => 'Jonas')
84
+ @session.should_not have_no_field('First Name', :with => 'Jonas')
100
85
  end
101
86
 
102
- it "should be false after a checked checkbox is unchecked" do
103
- @session.uncheck('form_pets_dog')
104
- @session.should_not have_checked_field('form_pets_dog')
87
+ it "should be true after the field has been filled in with a different value" do
88
+ @session.fill_in('First Name', :with => 'Jonas')
89
+ @session.should have_no_field('First Name', :with => 'John')
105
90
  end
91
+ end
106
92
 
107
- it "should be true after an unchecked radio button is chosen" do
108
- @session.choose('gender_male')
109
- @session.should have_checked_field('gender_male')
93
+ context 'with type' do
94
+ it "should be false if a field with the given type is on the page" do
95
+ @session.should_not have_no_field('First Name', :type => 'text')
96
+ @session.should_not have_no_field('Html5 Email', :type => 'email')
97
+ @session.should_not have_no_field('Html5 Tel', :type => 'tel')
110
98
  end
111
99
 
112
- it "should be false after another radio button in the group is chosen" do
113
- @session.choose('gender_male')
114
- @session.should_not have_checked_field('gender_female')
100
+ it "should be true if the given field is not on the page" do
101
+ @session.should have_no_field('First Name', :type => 'email')
102
+ @session.should have_no_field('Html5 Email', :type => 'tel')
103
+ @session.should have_no_field('Description', :type => '')
115
104
  end
116
105
  end
106
+ end
117
107
 
118
- describe '#has_no_checked_field?' do
119
- before { @session.visit('/form') }
108
+ Capybara::SpecHelper.spec '#has_checked_field?' do
109
+ before { @session.visit('/form') }
120
110
 
121
- it "should be false if a checked field is on the page" do
122
- @session.should_not have_no_checked_field('gender_female')
123
- @session.should_not have_no_checked_field('Hamster')
124
- end
111
+ it "should be true if a checked field is on the page" do
112
+ @session.should have_checked_field('gender_female')
113
+ @session.should have_checked_field('Hamster')
114
+ end
125
115
 
126
- it "should be true if an unchecked field is on the page" do
127
- @session.should have_no_checked_field('form_pets_cat')
128
- @session.should have_no_checked_field('Male')
129
- end
116
+ it "should be false if an unchecked field is on the page" do
117
+ @session.should_not have_checked_field('form_pets_cat')
118
+ @session.should_not have_checked_field('Male')
119
+ end
130
120
 
131
- it "should be true if no field is on the page" do
132
- @session.should have_no_checked_field('Does Not Exist')
133
- end
121
+ it "should be false if no field is on the page" do
122
+ @session.should_not have_checked_field('Does Not Exist')
134
123
  end
135
124
 
136
- describe '#has_unchecked_field?' do
137
- before { @session.visit('/form') }
125
+ it "should be true after an unchecked checkbox is checked" do
126
+ @session.check('form_pets_cat')
127
+ @session.should have_checked_field('form_pets_cat')
128
+ end
138
129
 
139
- it "should be false if a checked field is on the page" do
140
- @session.should_not have_unchecked_field('gender_female')
141
- @session.should_not have_unchecked_field('Hamster')
142
- end
130
+ it "should be false after a checked checkbox is unchecked" do
131
+ @session.uncheck('form_pets_dog')
132
+ @session.should_not have_checked_field('form_pets_dog')
133
+ end
143
134
 
144
- it "should be true if an unchecked field is on the page" do
145
- @session.should have_unchecked_field('form_pets_cat')
146
- @session.should have_unchecked_field('Male')
147
- end
135
+ it "should be true after an unchecked radio button is chosen" do
136
+ @session.choose('gender_male')
137
+ @session.should have_checked_field('gender_male')
138
+ end
148
139
 
149
- it "should be false if no field is on the page" do
150
- @session.should_not have_unchecked_field('Does Not Exist')
151
- end
140
+ it "should be false after another radio button in the group is chosen" do
141
+ @session.choose('gender_male')
142
+ @session.should_not have_checked_field('gender_female')
143
+ end
144
+ end
152
145
 
153
- it "should be false after an unchecked checkbox is checked" do
154
- @session.check('form_pets_cat')
155
- @session.should_not have_unchecked_field('form_pets_cat')
156
- end
146
+ Capybara::SpecHelper.spec '#has_no_checked_field?' do
147
+ before { @session.visit('/form') }
157
148
 
158
- it "should be true after a checked checkbox is unchecked" do
159
- @session.uncheck('form_pets_dog')
160
- @session.should have_unchecked_field('form_pets_dog')
161
- end
149
+ it "should be false if a checked field is on the page" do
150
+ @session.should_not have_no_checked_field('gender_female')
151
+ @session.should_not have_no_checked_field('Hamster')
152
+ end
162
153
 
163
- it "should be false after an unchecked radio button is chosen" do
164
- @session.choose('gender_male')
165
- @session.should_not have_unchecked_field('gender_male')
166
- end
154
+ it "should be true if an unchecked field is on the page" do
155
+ @session.should have_no_checked_field('form_pets_cat')
156
+ @session.should have_no_checked_field('Male')
157
+ end
167
158
 
168
- it "should be true after another radio button in the group is chosen" do
169
- @session.choose('gender_male')
170
- @session.should have_unchecked_field('gender_female')
171
- end
159
+ it "should be true if no field is on the page" do
160
+ @session.should have_no_checked_field('Does Not Exist')
172
161
  end
162
+ end
173
163
 
174
- describe '#has_no_unchecked_field?' do
175
- before { @session.visit('/form') }
164
+ Capybara::SpecHelper.spec '#has_unchecked_field?' do
165
+ before { @session.visit('/form') }
176
166
 
177
- it "should be true if a checked field is on the page" do
178
- @session.should have_no_unchecked_field('gender_female')
179
- @session.should have_no_unchecked_field('Hamster')
180
- end
167
+ it "should be false if a checked field is on the page" do
168
+ @session.should_not have_unchecked_field('gender_female')
169
+ @session.should_not have_unchecked_field('Hamster')
170
+ end
181
171
 
182
- it "should be false if an unchecked field is on the page" do
183
- @session.should_not have_no_unchecked_field('form_pets_cat')
184
- @session.should_not have_no_unchecked_field('Male')
185
- end
172
+ it "should be true if an unchecked field is on the page" do
173
+ @session.should have_unchecked_field('form_pets_cat')
174
+ @session.should have_unchecked_field('Male')
175
+ end
186
176
 
187
- it "should be true if no field is on the page" do
188
- @session.should have_no_unchecked_field('Does Not Exist')
189
- end
177
+ it "should be false if no field is on the page" do
178
+ @session.should_not have_unchecked_field('Does Not Exist')
179
+ end
180
+
181
+ it "should be false after an unchecked checkbox is checked" do
182
+ @session.check('form_pets_cat')
183
+ @session.should_not have_unchecked_field('form_pets_cat')
184
+ end
185
+
186
+ it "should be true after a checked checkbox is unchecked" do
187
+ @session.uncheck('form_pets_dog')
188
+ @session.should have_unchecked_field('form_pets_dog')
189
+ end
190
+
191
+ it "should be false after an unchecked radio button is chosen" do
192
+ @session.choose('gender_male')
193
+ @session.should_not have_unchecked_field('gender_male')
194
+ end
195
+
196
+ it "should be true after another radio button in the group is chosen" do
197
+ @session.choose('gender_male')
198
+ @session.should have_unchecked_field('gender_female')
190
199
  end
191
200
  end
192
201
 
202
+ Capybara::SpecHelper.spec '#has_no_unchecked_field?' do
203
+ before { @session.visit('/form') }
204
+
205
+ it "should be true if a checked field is on the page" do
206
+ @session.should have_no_unchecked_field('gender_female')
207
+ @session.should have_no_unchecked_field('Hamster')
208
+ end
209
+
210
+ it "should be false if an unchecked field is on the page" do
211
+ @session.should_not have_no_unchecked_field('form_pets_cat')
212
+ @session.should_not have_no_unchecked_field('Male')
213
+ end
214
+
215
+ it "should be true if no field is on the page" do
216
+ @session.should have_no_unchecked_field('Does Not Exist')
217
+ end
218
+ end
@@ -1,37 +1,34 @@
1
- shared_examples_for "has_link" do
2
-
3
- describe '#has_link?' do
4
- before do
5
- @session.visit('/with_html')
6
- end
1
+ Capybara::SpecHelper.spec '#has_link?' do
2
+ before do
3
+ @session.visit('/with_html')
4
+ end
7
5
 
8
- it "should be true if the given link is on the page" do
9
- @session.should have_link('foo')
10
- @session.should have_link('awesome title')
11
- @session.should have_link('A link', :href => '/with_simple_html')
12
- end
6
+ it "should be true if the given link is on the page" do
7
+ @session.should have_link('foo')
8
+ @session.should have_link('awesome title')
9
+ @session.should have_link('A link', :href => '/with_simple_html')
10
+ @session.should have_link(:'A link', :href => :'/with_simple_html')
11
+ end
13
12
 
14
- it "should be false if the given link is not on the page" do
15
- @session.should_not have_link('monkey')
16
- @session.should_not have_link('A link', :href => '/non-existant-href')
17
- end
13
+ it "should be false if the given link is not on the page" do
14
+ @session.should_not have_link('monkey')
15
+ @session.should_not have_link('A link', :href => '/non-existant-href')
18
16
  end
17
+ end
19
18
 
20
- describe '#has_no_link?' do
21
- before do
22
- @session.visit('/with_html')
23
- end
19
+ Capybara::SpecHelper.spec '#has_no_link?' do
20
+ before do
21
+ @session.visit('/with_html')
22
+ end
24
23
 
25
- it "should be false if the given link is on the page" do
26
- @session.should_not have_no_link('foo')
27
- @session.should_not have_no_link('awesome title')
28
- @session.should_not have_no_link('A link', :href => '/with_simple_html')
29
- end
24
+ it "should be false if the given link is on the page" do
25
+ @session.should_not have_no_link('foo')
26
+ @session.should_not have_no_link('awesome title')
27
+ @session.should_not have_no_link('A link', :href => '/with_simple_html')
28
+ end
30
29
 
31
- it "should be true if the given link is not on the page" do
32
- @session.should have_no_link('monkey')
33
- @session.should have_no_link('A link', :href => '/non-existant-href')
34
- end
30
+ it "should be true if the given link is not on the page" do
31
+ @session.should have_no_link('monkey')
32
+ @session.should have_no_link('A link', :href => '/non-existant-href')
35
33
  end
36
34
  end
37
-