Sha256: fc1faa060a1355530fc959f1703e505b4a17d490286c9c985023959adf0954a4

Contents?: true

Size: 1.16 KB

Versions: 72

Compression:

Stored size: 1.16 KB

Contents

require 'spec_helper'
require 'facter/core/execution'

describe Facter::Core::Execution do
  subject { described_class}
  let(:impl) { described_class.impl }

  it "delegates #search_paths to the implementation" do
    impl.expects(:search_paths)
    subject.search_paths
  end

  it "delegates #which to the implementation" do
    impl.expects(:which).with('waffles')
    subject.which('waffles')
  end

  it "delegates #absolute_path? to the implementation" do
    impl.expects(:absolute_path?).with('waffles', nil)
    subject.absolute_path?('waffles')
  end

  it "delegates #absolute_path? with an optional platform to the implementation" do
    impl.expects(:absolute_path?).with('waffles', :windows)
    subject.absolute_path?('waffles', :windows)
  end

  it "delegates #expand_command to the implementation" do
    impl.expects(:expand_command).with('waffles')
    subject.expand_command('waffles')
  end

  it "delegates #exec to #execute" do
    impl.expects(:execute).with('waffles', {:on_fail => nil})
    subject.exec('waffles')
  end

  it "delegates #execute to the implementation" do
    impl.expects(:execute).with('waffles', {})
    subject.execute('waffles')
  end
end

Version data entries

72 entries across 72 versions & 1 rubygems

Version Path
facter-2.5.7 spec/unit/core/execution_spec.rb
facter-2.5.7-x86-mingw32 spec/unit/core/execution_spec.rb
facter-2.5.7-x64-mingw32 spec/unit/core/execution_spec.rb
facter-2.5.7-universal-darwin spec/unit/core/execution_spec.rb
facter-2.5.6-x86-mingw32 spec/unit/core/execution_spec.rb
facter-2.5.6-x64-mingw32 spec/unit/core/execution_spec.rb
facter-2.5.6-universal-darwin spec/unit/core/execution_spec.rb
facter-2.5.6 spec/unit/core/execution_spec.rb
facter-2.5.5-x86-mingw32 spec/unit/core/execution_spec.rb
facter-2.5.5-x64-mingw32 spec/unit/core/execution_spec.rb
facter-2.5.5-universal-darwin spec/unit/core/execution_spec.rb
facter-2.5.5 spec/unit/core/execution_spec.rb
facter-2.5.4-x86-mingw32 spec/unit/core/execution_spec.rb
facter-2.5.4-x64-mingw32 spec/unit/core/execution_spec.rb
facter-2.5.4-universal-darwin spec/unit/core/execution_spec.rb
facter-2.5.4 spec/unit/core/execution_spec.rb
facter-2.5.1 spec/unit/core/execution_spec.rb
facter-2.5.1-x86-mingw32 spec/unit/core/execution_spec.rb
facter-2.5.1-x64-mingw32 spec/unit/core/execution_spec.rb
facter-2.5.1-universal-darwin spec/unit/core/execution_spec.rb