X-Git-Url: https://git.adam-barratt.org.uk/?a=blobdiff_plain;f=3rdparty%2Fmodules%2Frabbitmq%2Fspec%2Funit%2Ffacter%2Futil%2Ffact_erl_ssl_path_spec.rb;fp=3rdparty%2Fmodules%2Frabbitmq%2Fspec%2Funit%2Ffacter%2Futil%2Ffact_erl_ssl_path_spec.rb;h=0000000000000000000000000000000000000000;hb=24caa46729f80fbba4be8b9b26ebcb3acc4cb0fb;hp=679a90162ff26b9e4aae2974321a4a8bce2c6ba2;hpb=c7e7bcc28cc5dc48a7e284a3c82f33df27d1f57d;p=mirror%2Fdsa-puppet.git diff --git a/3rdparty/modules/rabbitmq/spec/unit/facter/util/fact_erl_ssl_path_spec.rb b/3rdparty/modules/rabbitmq/spec/unit/facter/util/fact_erl_ssl_path_spec.rb deleted file mode 100644 index 679a90162..000000000 --- a/3rdparty/modules/rabbitmq/spec/unit/facter/util/fact_erl_ssl_path_spec.rb +++ /dev/null @@ -1,39 +0,0 @@ -require 'spec_helper' - -describe Facter::Util::Fact do - before { Facter.clear } - - describe 'erl_ssl_path' do - context 'with valid value' do - before do - allow(Facter::Util::Resolution).to receive(:which).with('erl') { true } - allow(Facter::Core::Execution).to receive(:execute).with("erl -eval 'io:format(\"~p\", [code:lib_dir(ssl, ebin)]),halt().' -noshell") { '"/usr/lib64/erlang/lib/ssl-5.3.3/ebin"' } - end - - it do - expect(Facter.fact(:erl_ssl_path).value).to eq('/usr/lib64/erlang/lib/ssl-5.3.3/ebin') - end - end - - context 'with error message' do - before do - allow(Facter::Util::Resolution).to receive(:which).with('erl') { true } - allow(Facter::Core::Execution).to receive(:execute).with("erl -eval 'io:format(\"~p\", [code:lib_dir(ssl, ebin)]),halt().' -noshell") { '{error,bad_name}' } - end - - it do - expect(Facter.fact(:erl_ssl_path).value).to be_nil - end - end - - context 'with erl not present' do - before do - allow(Facter::Util::Resolution).to receive(:which).with('erl') { false } - end - - it do - expect(Facter.fact(:erl_ssl_path).value).to be_nil - end - end - end -end