Skip to content

Commit 493f0cb

Browse files
committed
(CONT-237) - Set rspec as default for mock_with
1 parent ae11109 commit 493f0cb

File tree

2 files changed

+1
-10
lines changed

2 files changed

+1
-10
lines changed

lib/puppetlabs_spec_helper/puppet_spec_helper.rb

Lines changed: 1 addition & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -135,15 +135,7 @@ def handle(msg)
135135
# `mock_framework`'s autoloading to distinguish between the default, and
136136
# the module's choice.
137137
if config.instance_variable_get(:@mock_framework).nil?
138-
RSpec.warn_deprecation('puppetlabs_spec_helper: defaults `mock_with` to `:mocha`. See https://github.com/puppetlabs/puppetlabs_spec_helper#mock_with to choose a sensible value for you')
139-
config.mock_with :mocha
140-
end
141-
142-
# determine whether we can use the new API or not, and call the appropriate initializer method.
143-
if defined?(Puppet::Test::TestHelper)
144-
# This case is handled by rspec-puppet since v1.0.0 (via 41257b33cb1f9ade4426b044f70be511b0c89112)
145-
else
146-
Puppet::PuppetSpecInitializer.initialize_via_fallback_compatibility(config)
138+
config.mock_with :rspec
147139
end
148140

149141
# Here we do some general setup that is relevant to all initialization modes, regardless

spec/spec_helper.rb

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -48,7 +48,6 @@ def symlink?
4848
config.expect_with :rspec do |c|
4949
c.syntax = :expect
5050
end
51-
config.mock_with :rspec
5251

5352
config.include_context 'with a rake task', type: :task
5453
end

0 commit comments

Comments
 (0)