Module: Transpec::Syntax::Mixin::HaveMatcherOwner

Extended by:
ActiveSupport::Concern
Included in:
Expect, ShouldBase
Defined in:
lib/transpec/syntax/mixin/have_matcher_owner.rb

Instance Method Summary collapse

Instance Method Details

#have_matcherObject

rubocop:disable PredicateName



20
21
22
23
24
25
26
27
28
# File 'lib/transpec/syntax/mixin/have_matcher_owner.rb', line 20

def have_matcher # rubocop:disable PredicateName
  return @have_matcher if instance_variable_defined?(:@have_matcher)

  @have_matcher ||= if Have.conversion_target_node?(matcher_node, @runtime_data)
                      create_have_matcher
                    else
                      nil
                    end
end