module RSpec::UnitExt::Expectation::Attributes

Constants

ATTRS
INFERRED_ATTRS

Public Instance Methods

base() click to toggle source
# File lib/rspec/unit_ext/expectation/attributes.rb, line 22
def base
  base = @attributes[:base] || @example_group.described_class

  if base.is_a? Proc
    base.call
  else
    base
  end
end
fill_attributes(**attributes) click to toggle source
# File lib/rspec/unit_ext/expectation/attributes.rb, line 40
def fill_attributes(**attributes)
  @attributes ||= {}
  @attributes   = attributes.slice(*ATTRS).merge @attributes
end
matcher() click to toggle source
# File lib/rspec/unit_ext/expectation/attributes.rb, line 36
def matcher
  @attributes[:matcher] || :eq
end
method() click to toggle source
# File lib/rspec/unit_ext/expectation/attributes.rb, line 32
def method
  @attributes[:method] || @example_group.described_method
end
override_attributes(**attributes) click to toggle source
# File lib/rspec/unit_ext/expectation/attributes.rb, line 45
def override_attributes(**attributes)
  @attributes ||= {}
  @attributes   = @attributes.merge attributes.slice(*ATTRS)
end