1
0
Fork 0
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:
Akira Matsuda 2015-07-21 17:26:34 +09:00
parent e06e2ba7be
commit 8f43c71e78

View file

@ -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)