mirror of
https://github.com/teamcapybara/capybara.git
synced 2022-11-09 12:08:07 -05:00
"warning: instance variable @type not initialized"
This commit is contained in:
parent
e06e2ba7be
commit
8f43c71e78
1 changed files with 1 additions and 1 deletions
|
@ -3,7 +3,7 @@ module Capybara
|
||||||
module Queries
|
module Queries
|
||||||
class TextQuery < BaseQuery
|
class TextQuery < BaseQuery
|
||||||
def initialize(*args)
|
def initialize(*args)
|
||||||
@type = args.shift if args.first.is_a?(Symbol) || args.first.nil?
|
@type = (args.first.is_a?(Symbol) || args.first.nil?) ? args.shift : nil
|
||||||
@expected_text, @options = args
|
@expected_text, @options = args
|
||||||
unless @expected_text.is_a?(Regexp)
|
unless @expected_text.is_a?(Regexp)
|
||||||
@expected_text = Capybara::Helpers.normalize_whitespace(@expected_text)
|
@expected_text = Capybara::Helpers.normalize_whitespace(@expected_text)
|
||||||
|
|
Loading…
Reference in a new issue