Module: Insta::RSpec::Matchers

Defined in:
lib/insta/rspec/matchers.rb,
sig/insta/rspec/matchers.rbs

Defined Under Namespace

Classes: MatchInlineSnapshot, MatchSnapshot

Instance Method Summary collapse

Instance Method Details

#match_inline_snapshot(expected = nil, serializer: nil, redact: nil) ⇒ MatchInlineSnapshot

: (?String?, ?serializer: Symbol?, ?redact: Hash[String, untyped]?) -> MatchInlineSnapshot

Parameters:

  • (String, nil)
  • serializer: (Symbol, nil) (defaults to: nil)
  • redact: (Hash[String, untyped], nil) (defaults to: nil)

Returns:



243
244
245
# File 'lib/insta/rspec/matchers.rb', line 243

def match_inline_snapshot(expected = nil, serializer: nil, redact: nil)
  MatchInlineSnapshot.new(expected, serializer: serializer, redact: redact)
end

#match_snapshot(name = nil, serializer: nil, redact: nil) ⇒ MatchSnapshot

: (?String?, ?serializer: Symbol?, ?redact: Hash[String, untyped]?) -> MatchSnapshot

Parameters:

  • (String, nil)
  • serializer: (Symbol, nil) (defaults to: nil)
  • redact: (Hash[String, untyped], nil) (defaults to: nil)

Returns:



238
239
240
# File 'lib/insta/rspec/matchers.rb', line 238

def match_snapshot(name = nil, serializer: nil, redact: nil)
  MatchSnapshot.new(name, serializer: serializer, redact: redact)
end