Sha256: 48e0783284ef188bb9fddb03f675fd7cdace0d781d3aea961f40c74518ba6239

Contents?: true

Size: 854 Bytes

Versions: 10

Compression:

Stored size: 854 Bytes

Contents

require 'spec_helper'

describe Chef::Sugar::Architecture do
  it_behaves_like 'a chef sugar'

  describe '#_64_bit?' do
    it 'returns true when the system is 64 bit' do
      node = { 'kernel' => { 'machine' => 'x86_64' } }
      expect(described_class._64_bit?(node)).to be_true
    end

    it 'returns false when the system is not 64 bit' do
      node = { 'kernel' => { 'machine' => 'i386' } }
      expect(described_class._64_bit?(node)).to be_false
    end
  end

  describe '#_32_bit?' do
    it 'returns true when the system is 32 bit' do
      node = { 'kernel' => { 'machine' => 'i386' } }
      expect(described_class._32_bit?(node)).to be_true
    end

    it 'returns false when the system is not 32 bit' do
      node = { 'kernel' => { 'machine' => 'x86_64' } }
      expect(described_class._32_bit?(node)).to be_false
    end
  end
end

Version data entries

10 entries across 10 versions & 1 rubygems

Version Path
chef-sugar-1.3.0 spec/unit/chef/sugar/architecture_spec.rb
chef-sugar-1.2.6 spec/unit/chef/sugar/architecture_spec.rb
chef-sugar-1.2.4 spec/unit/chef/sugar/architecture_spec.rb
chef-sugar-1.2.2 spec/unit/chef/sugar/architecture_spec.rb
chef-sugar-1.2.0 spec/unit/chef/sugar/architecture_spec.rb
chef-sugar-1.2.0.beta.1 spec/unit/chef/sugar/architecture_spec.rb
chef-sugar-1.1.0 spec/unit/chef/extensions/architecture_spec.rb
chef-sugar-1.0.1 spec/unit/chef/extensions/architecture_spec.rb
chef-sugar-1.0.0 spec/unit/chef/extensions/architecture_spec.rb
chef-sugar-1.0.0.beta.1 spec/unit/chef/extensions/architecture_spec.rb