Sha256: efb1f5312497419aee7c26ae7c6898998cb81f0c91e3e72f24bbb24f977d09e7

Contents?: true

Size: 702 Bytes

Versions: 9

Compression:

Stored size: 702 Bytes

Contents

require_relative '../spec_helper'

require 'wright/resource/group'

describe Wright::Resource::Group do
  before(:each) do
    @group = Wright::Resource::Group.new('foo')
    @provider = Minitest::Mock.new
    @group.instance_variable_set(:@provider, @provider)
  end

  describe '#create' do
    it 'should ask the provider to create the group' do
      @provider.expect(:create, nil)
      @provider.expect(:updated?, true)
      @group.create
      @provider.verify
    end
  end

  describe '#remove' do
    it 'should ask the provider to remove the group' do
      @provider.expect(:remove, nil)
      @provider.expect(:updated?, true)
      @group.remove
      @provider.verify
    end
  end
end

Version data entries

9 entries across 9 versions & 1 rubygems

Version Path
wright-0.4.4 spec/resource/group_spec.rb
wright-0.4.3 spec/resource/group_spec.rb
wright-0.4.2 spec/resource/group_spec.rb
wright-0.4.1 spec/resource/group_spec.rb
wright-0.4.0 spec/resource/group_spec.rb
wright-0.3.2 spec/resource/group_spec.rb
wright-0.3.1 spec/resource/group_spec.rb
wright-0.3.0 spec/resource/group_spec.rb
wright-0.2.0 spec/resource/group_spec.rb