Skip to content

Commit

Permalink
Merge pull request #620 from wyardley/update_spec_tests
Browse files Browse the repository at this point in the history
Update 'require' statements and mock types to fix spec tests
  • Loading branch information
bastelfreak authored Sep 9, 2017
2 parents 555a3c6 + 57fa256 commit a3fdcb2
Show file tree
Hide file tree
Showing 9 changed files with 16 additions and 47 deletions.
Original file line number Diff line number Diff line change
@@ -1,8 +1,5 @@
require 'puppet'
require 'mocha/api'
RSpec.configure do |config|
config.mock_with :mocha
end
require 'spec_helper'

provider_class = Puppet::Type.type(:rabbitmq_binding).provider(:rabbitmqadmin)
describe provider_class do
let(:resource) do
Expand Down
Original file line number Diff line number Diff line change
@@ -1,8 +1,5 @@
require 'puppet'
require 'mocha'
RSpec.configure do |config|
config.mock_with :mocha
end
require 'spec_helper'

provider_class = Puppet::Type.type(:rabbitmq_exchange).provider(:rabbitmqadmin)
describe provider_class do
let(:resource) do
Expand Down
Original file line number Diff line number Diff line change
@@ -1,9 +1,4 @@
require 'puppet'
require 'mocha'

RSpec.configure do |config|
config.mock_with :mocha
end
require 'spec_helper'

describe Puppet::Type.type(:rabbitmq_parameter).provider(:rabbitmqctl) do
let(:resource) do
Expand Down
7 changes: 2 additions & 5 deletions spec/unit/puppet/provider/rabbitmq_plugin/rabbitmqctl_spec.rb
Original file line number Diff line number Diff line change
@@ -1,8 +1,5 @@
require 'puppet'
require 'mocha'
RSpec.configure do |config|
config.mock_with :mocha
end
require 'spec_helper'

provider_class = Puppet::Type.type(:rabbitmq_plugin).provider(:rabbitmqplugins)
describe provider_class do
let(:resource) do
Expand Down
Original file line number Diff line number Diff line change
@@ -1,9 +1,4 @@
require 'puppet'
require 'mocha'

RSpec.configure do |config|
config.mock_with :mocha
end
require 'spec_helper'

describe Puppet::Type.type(:rabbitmq_policy).provider(:rabbitmqctl) do
let(:resource) do
Expand Down
Original file line number Diff line number Diff line change
@@ -1,8 +1,5 @@
require 'puppet'
require 'mocha/api'
RSpec.configure do |config|
config.mock_with :mocha
end
require 'spec_helper'

provider_class = Puppet::Type.type(:rabbitmq_queue).provider(:rabbitmqadmin)
describe provider_class do
let(:resource) do
Expand Down
7 changes: 2 additions & 5 deletions spec/unit/puppet/provider/rabbitmq_user/rabbitmqctl_spec.rb
Original file line number Diff line number Diff line change
@@ -1,8 +1,5 @@
require 'puppet'
require 'mocha'
RSpec.configure do |config|
config.mock_with :mocha
end
require 'spec_helper'

provider_class = Puppet::Type.type(:rabbitmq_user).provider(:rabbitmqctl)
describe provider_class do
let(:resource) do
Expand Down
Original file line number Diff line number Diff line change
@@ -1,8 +1,5 @@
require 'puppet'
require 'mocha'
RSpec.configure do |config|
config.mock_with :mocha
end
require 'spec_helper'

describe 'Puppet::Type.type(:rabbitmq_user_permissions).provider(:rabbitmqctl)' do
let(:resource) do
Puppet::Type::Rabbitmq_user_permissions.new(
Expand Down
7 changes: 2 additions & 5 deletions spec/unit/puppet/provider/rabbitmq_vhost/rabbitmqctl_spec.rb
Original file line number Diff line number Diff line change
@@ -1,8 +1,5 @@
require 'puppet'
require 'mocha'
RSpec.configure do |config|
config.mock_with :mocha
end
require 'spec_helper'

provider_class = Puppet::Type.type(:rabbitmq_vhost).provider(:rabbitmqctl)
describe provider_class do
let(:resource) do
Expand Down

0 comments on commit a3fdcb2

Please sign in to comment.