Sha256: a3ad138eced87d8e75ee38603749837d8698354ce736188836e9f87a0e7d5bea

Contents?: true

Size: 1.02 KB

Versions: 3

Compression:

Stored size: 1.02 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 the implementation" do
    impl.expects(:exec).with('waffles', {})
    subject.exec('waffles')
  end
end

Version data entries

3 entries across 3 versions & 1 rubygems

Version Path
facter-2.0.1.rc2 spec/unit/core/execution_spec.rb
facter-2.0.1.rc2-x86-mingw32 spec/unit/core/execution_spec.rb
facter-2.0.1.rc2-universal-darwin spec/unit/core/execution_spec.rb