Skip to content

Commit 6ae5c1d

Browse files
committed
Switch back to mocha to limit porting effort required
1 parent 610f54c commit 6ae5c1d

File tree

4 files changed

+13
-3
lines changed

4 files changed

+13
-3
lines changed

.sync.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -3,7 +3,7 @@
33
include_todos: true
44

55
spec/spec_helper.rb:
6-
mock_with: ':rspec'
6+
mock_with: ':mocha'
77

88
.travis.yml:
99
simplecov: true

lib/puppet/provider/logical_volume/lvm.rb

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -223,7 +223,7 @@ def size=(new_size)
223223
if @resource[:size_is_minsize] == :true || @resource[:size_is_minsize] == true || @resource[:size_is_minsize] == 'true'
224224
info("Logical volume already has minimum size of #{new_size} (currently #{current_size})")
225225
else
226-
raise("Decreasing the size requires manual intervention (#{new_size} < #{current_size})")
226+
raise(Puppet::Error, "Decreasing the size requires manual intervention (#{new_size} < #{current_size})")
227227
end
228228
else
229229
lvextend('-L', new_size, path) || raise("Cannot extend to size #{new_size} because lvextend failed.")

spec/spec_helper.rb

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
RSpec.configure do |c|
2-
c.mock_with :rspec
2+
c.mock_with :mocha
33
end
44

55
require 'puppetlabs_spec_helper/module_spec_helper'

spec/spec_helper_local.rb

Lines changed: 10 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,10 @@
1+
dir = File.dirname(__FILE__)
2+
$LOAD_PATH.unshift(File.join(dir, 'lib'))
3+
4+
require 'helpers'
5+
require 'matchers'
6+
7+
RSpec.configure do |config|
8+
config.include Helpers
9+
config.include Matchers
10+
end

0 commit comments

Comments
 (0)