Sha256: 9ab43b6e82c85bfd4224aff82d78f431541731cbe5e570d3d40d32d9a1779f6f

Contents?: true

Size: 1.11 KB

Versions: 2

Compression:

Stored size: 1.11 KB

Contents

require 'spec_helper'

describe 'prepl' do
  let(:fixtures_file) do
    File.join(fixtures_dir, 'sample_manifest.pp')
  end

  let(:file_url) do
    'https://gist.githubusercontent.com/logicminds/f9b1ac65a3a440d562b0/raw'
  end

  it do
    expect(`echo 'file{"/tmp/test":}'| bundle exec bin/prepl`)
      .to match(/Puppet::Type::File/)
  end

  it do
    expect(`bundle exec bin/prepl #{fixtures_file} --run-once`)
      .to match(/Puppet::Type::File/)
  end
  it do
    expect(`bundle exec bin/prepl --play #{fixtures_file} --run-once`)
      .to match(/Puppet::Type::File/)
  end
  it do
    expect(`bundle exec bin/prepl --play #{file_url} --run-once`)
      .to match(/Puppet::Type::File/)
  end

  describe 'remote_node' do
    let(:node_obj) do
      YAML.load_file(File.join(fixtures_dir, 'node_obj.yaml'))
    end
    let(:node_name) do
      'puppetdev.localdomain'
    end
    before :each do
      allow(PuppetRepl).to receive(:get_remote_node).with(node_name).and_return(node_obj)
    end
    xit do
      expect(`echo 'vars'| bundle exec bin/prepl -n #{node_name}`)
        .to match(/server_facts/)
    end
  end
end

Version data entries

2 entries across 2 versions & 1 rubygems

Version Path
puppet-repl-0.2.1 spec/prepl_spec.rb
puppet-repl-0.2.0 spec/prepl_spec.rb