Skip to content

Commit bde57bb

Browse files
committed
Fix: private method 'warn' called for class ActiveSupport::Deprecation
1 parent 4afa752 commit bde57bb

9 files changed

Lines changed: 18 additions & 18 deletions

File tree

features/step_definitions/custom_web_steps.rb

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -2,14 +2,14 @@
22

33
#DEPRECATED: replace with <<there should( not| n't)? be a link to ([^"]*)>>
44
Then "(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) }
88
end
99

1010
#DEPRECATED: replace with <<there should( not| n't)? be a link to ([^"]*)>>
1111
Then /^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) }
1515
end
@@ -21,7 +21,7 @@ def matches_path?(url, path)
2121

2222
#DEPRECATED: replace with <<there should( not| n't)? be a link to ([^"]*)>>
2323
Then /^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}"
3535
Then /^(?: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)
3838
end
3939

4040
#DEPRECATED: replace with "there {should} be a link to {string}"
4141
Then /^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}']"
4444
end
4545

features/step_definitions/finance/invoicing_steps.rb

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -54,7 +54,7 @@
5454
end
5555

5656
Given "an invoice of {buyer} for {date} with items(:)" do |buyer, month, items|
57-
ActiveSupport::Deprecation.warn '[Cucumber] Deprecated! Use the newer step.'
57+
ActiveSupport.deprecator.warn '[Cucumber] Deprecated! Use the newer step.'
5858
invoice = create_invoice buyer, month
5959
items.hashes.each { |item| invoice.line_items.create!(item) }
6060
end
@@ -109,7 +109,7 @@
109109
end
110110

111111
Then /^the buyer should have following line items for "([^"]*)"(?: in the (\d)(?:nd|st|rd|th))? invoice:$/ do |date, order, items|
112-
ActiveSupport::Deprecation.warn '[Cucumber] Deprecated! Assert table instead.'
112+
ActiveSupport.deprecator.warn '[Cucumber] Deprecated! Assert table instead.'
113113
step "the buyer logs in"
114114

115115
visit admin_account_invoices_path
@@ -133,7 +133,7 @@
133133

134134
# TODO: change to accept REGEXPs! (use page.body and assert)
135135
Then(/^I should see line items$/) do |items|
136-
ActiveSupport::Deprecation.warn '[Cucumber] Deprecated! Assert table instead.'
136+
ActiveSupport.deprecator.warn '[Cucumber] Deprecated! Assert table instead.'
137137
assert_line_items(items)
138138
end
139139

features/step_definitions/form_steps.rb

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -91,7 +91,7 @@
9191
end
9292

9393
When "(I )(they )select {string} from {string}" do |value, field|
94-
ActiveSupport::Deprecation.warn "[cucumber] Detected a form not using PF4 css" unless page.has_css?('.pf-c-form__label', text: field, wait: 0)
94+
ActiveSupport.deprecator.warn "[cucumber] Detected a form not using PF4 css" unless page.has_css?('.pf-c-form__label', text: field, wait: 0)
9595
element = find_field(field)
9696
# 'input' for React forms, and 'select' for HTML
9797
if element.tag_name == 'select'

features/step_definitions/pagination_steps.rb

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,7 @@
22

33
Then "(I )(they )should see {int} pages" do |count|
44
if has_css?('.pagination', wait: 0)
5-
ActiveSupport::Deprecation.warn 'Implement table toolbar instead'
5+
ActiveSupport.deprecator.warn 'Implement table toolbar instead'
66
links = within(".pagination") do
77
all("a:not(.next_page), em.current")
88
end
@@ -17,7 +17,7 @@
1717

1818
When "they look at the {ordinal} page" do |page|
1919
if has_css?('.pagination', wait: 0)
20-
ActiveSupport::Deprecation.warn 'Implement table toolbar instead'
20+
ActiveSupport.deprecator.warn 'Implement table toolbar instead'
2121
within ".pagination" do
2222
click_link page
2323
end

features/step_definitions/search_steps.rb

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -29,7 +29,7 @@
2929

3030
# DEPRECATED: remove and use "the table is filtered with:"
3131
When "I/they search for:" do |table|
32-
ActiveSupport::Deprecation.warn 'remove and use "the table is filtered with:"'
32+
ActiveSupport.deprecator.warn 'remove and use "the table is filtered with:"'
3333
within ".search" do
3434
parameterize_headers(table)
3535

features/step_definitions/service_steps.rb

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -47,12 +47,12 @@
4747
end
4848

4949
Given "the service of {provider} has {string} {enabled}" do |account, toggle, enabled|
50-
ActiveSupport::Deprecation.warn '[cucumber] stop using "the service of provider" use "product" instead'
50+
ActiveSupport.deprecator.warn '[cucumber] stop using "the service of provider" use "product" instead'
5151
account.first_service!.update_attribute("#{underscore_spaces(toggle)}_enabled", enabled)
5252
end
5353

5454
Given "the service of {provider} has {string} set to {string}" do |account, name, value|
55-
ActiveSupport::Deprecation.warn '[cucumber] stop using "the service of provider" use "product" instead'
55+
ActiveSupport.deprecator.warn '[cucumber] stop using "the service of provider" use "product" instead'
5656
account.first_service!.update_attribute(underscore_spaces(name), value)
5757
end
5858

features/support/capybara_extensions.rb

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -19,7 +19,7 @@ def fill_in(field, with:, **options)
1919
.find('input.pf-c-form-control')
2020
.set with
2121
else
22-
ActiveSupport::Deprecation.warn "[cucumber] field not implemented with Patternfly: #{field}"
22+
ActiveSupport.deprecator.warn "[cucumber] field not implemented with Patternfly: #{field}"
2323
super
2424
end
2525
end
@@ -40,7 +40,7 @@ def select(value = nil, from: nil, **options)
4040
end
4141
end
4242
else
43-
ActiveSupport::Deprecation.warn "[cucumber] Select not implemented with Patternfly: #{from}"
43+
ActiveSupport.deprecator.warn "[cucumber] Select not implemented with Patternfly: #{from}"
4444
super
4545
end
4646
end

features/support/helpers/table_helpers.rb

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -12,7 +12,7 @@ module TableHelpers
1212
#
1313
def extract_table(table, rows, cells = nil)
1414
table = find(*table)
15-
ActiveSupport::Deprecation.warn '[Cucumber] Table not implemented with Patternfly' unless table[:class].include?('pf-c-table')
15+
ActiveSupport.deprecator.warn '[Cucumber] Table not implemented with Patternfly' unless table[:class].include?('pf-c-table')
1616
table.all(*rows).map do |row|
1717
if cells.respond_to?(:call)
1818
cells.call(row)

features/support/plan_helpers.rb

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
module PlanHelpers
22

33
def create_plan(type, options)
4-
ActiveSupport::Deprecation.warn '[create_plan] Stop using this method, use factories'
4+
ActiveSupport.deprecator.warn '[create_plan] Stop using this method, use factories'
55
options[:cost] ||= 0
66

77
issuer = options[:issuer]

0 commit comments

Comments
 (0)