Module: RSpec::Snapshot::Matchers

Defined in:
lib/rspec/snapshot/matchers.rb,
lib/rspec/snapshot/matchers/match_snapshot.rb

Overview

rubocop:disable Style/Documentation

Defined Under Namespace

Classes: MatchSnapshot

Instance Method Summary collapse

Instance Method Details

#match_snapshot(snapshot_name, config = {}) ⇒ Object Also known as: snapshot



11
12
13
14
15
# File 'lib/rspec/snapshot/matchers.rb', line 11

def match_snapshot(snapshot_name, config = {})
  MatchSnapshot.new(SerializerFactory.new(config).create,
                    FileOperator.new(snapshot_name,
                                     RSpec.current_example.))
end