Module: Minitest
- Defined in:
- lib/minitest/snapshots_plugin.rb,
lib/minitest/snapshots/version.rb,
lib/minitest/snapshots/serializer.rb,
lib/minitest/snapshots/test_extensions.rb,
lib/minitest/snapshots/assertion_extensions.rb
Defined Under Namespace
Modules: Assertions, Snapshots
Class Method Summary
collapse
Class Method Details
.plugin_snapshots_init(_options) ⇒ Object
15
16
17
18
19
|
# File 'lib/minitest/snapshots_plugin.rb', line 15
def self.plugin_snapshots_init(_options)
require_relative "snapshots/test_extensions"
require_relative "snapshots/assertion_extensions"
Minitest::Test.include Minitest::Snapshots::TestExtensions
end
|
.plugin_snapshots_options(opts, _options) ⇒ Object
5
6
7
8
9
10
11
12
13
|
# File 'lib/minitest/snapshots_plugin.rb', line 5
def self.plugin_snapshots_options(opts, _options)
opts.on "-u", "--update-snapshots", "Update (overwrite) stored snapshots" do
Minitest::Snapshots.force_updates = true
end
opts.on "-l", "--lock-snapshots", "Prevent any snapshots from being stored" do
Minitest::Snapshots.lock_snapshots = true
end
end
|