2013-05-02 15:10:59 +02:00
|
|
|
require 'spec_helper'
|
|
|
|
|
2015-06-01 13:21:59 +02:00
|
|
|
describe 'dirname' do
|
|
|
|
it { is_expected.not_to eq(nil) }
|
|
|
|
it { is_expected.to run.with_params().and_raise_error(Puppet::ParseError) }
|
|
|
|
it { is_expected.to run.with_params('one', 'two').and_raise_error(Puppet::ParseError) }
|
|
|
|
it { is_expected.to run.with_params([]).and_raise_error(Puppet::ParseError) }
|
|
|
|
it { is_expected.to run.with_params({}).and_raise_error(Puppet::ParseError) }
|
|
|
|
it { is_expected.to run.with_params(1).and_raise_error(Puppet::ParseError) }
|
|
|
|
it { is_expected.to run.with_params('/path/to/a/file.ext', []).and_raise_error(Puppet::ParseError) }
|
|
|
|
it { is_expected.to run.with_params('/path/to/a/file.ext').and_return('/path/to/a') }
|
|
|
|
it { is_expected.to run.with_params('relative_path/to/a/file.ext').and_return('relative_path/to/a') }
|
2013-05-02 15:10:59 +02:00
|
|
|
end
|