22
33#DEPRECATED: replace with <<there should( not| n't)? be a link to ([^"]*)>>
44Then "(I )(they )should see (a )(the )link to {}" do |page_name |
5- ActiveSupport :: Deprecation . warn 'replace with <<there should( not| n\'t)? be a link to ([^"]*)>>'
5+ ActiveSupport . deprecator . warn 'replace with <<there should( not| n\'t)? be a link to ([^"]*)>>'
66 path = path_to ( page_name )
77 assert page . all ( 'a' ) . any? { |node | matches_path? ( node [ :href ] , path ) }
88end
99
1010#DEPRECATED: replace with <<there should( not| n't)? be a link to ([^"]*)>>
1111Then /^I should not see link to (.+)$/ do |page_name |
12- ActiveSupport :: Deprecation . warn 'replace with <<there should( not| n\'t)? be a link to ([^"]*)>>'
12+ ActiveSupport . deprecator . warn 'replace with <<there should( not| n\'t)? be a link to ([^"]*)>>'
1313 path = path_to ( page_name )
1414 assert page . all ( 'a' ) . none? { |node | matches_path? ( node [ :href ] , path ) }
1515end
@@ -21,7 +21,7 @@ def matches_path?(url, path)
2121
2222#DEPRECATED: replace with <<there should( not| n't)? be a link to ([^"]*)>>
2323Then /^I should see (?:|the )link "([^"]*)" containing "([^"]*)" in the URL$/ do |label , params |
24- ActiveSupport :: Deprecation . warn 'replace with <<there should( not| n\'t)? be a link to ([^"]*)>>'
24+ ActiveSupport . deprecator . warn 'replace with <<there should( not| n\'t)? be a link to ([^"]*)>>'
2525 params = params . split
2626 href_contain_params = proc do |selector |
2727 params . each do |param |
@@ -33,13 +33,13 @@ def matches_path?(url, path)
3333
3434#DEPRECATED: replace with "there {should} be a link to {string}"
3535Then /^(?:I )?should see (the |)link "([^"]*)"$/ do |_ , label |
36- ActiveSupport :: Deprecation . warn 'replace with "there {should} be a link to {string}"'
36+ ActiveSupport . deprecator . warn 'replace with "there {should} be a link to {string}"'
3737 assert page . has_css? ( 'a' , :text => label )
3838end
3939
4040#DEPRECATED: replace with "there {should} be a link to {string}"
4141Then /^I should not see (?:the )?link "([^"]*)"$/ do |label |
42- ActiveSupport :: Deprecation . warn 'replace with "there {should} be a link to {string}"'
42+ ActiveSupport . deprecator . warn 'replace with "there {should} be a link to {string}"'
4343 assert page . has_no_xpath? ".//a[text()='#{ label } ']"
4444end
4545
0 commit comments