diff options
author | Lamont Granquist <lamont@scriptkiddie.org> | 2020-07-16 11:03:20 -0700 |
---|---|---|
committer | Lamont Granquist <lamont@scriptkiddie.org> | 2020-07-16 11:03:20 -0700 |
commit | 00e8b1616252a8aee6b8646551946aaa5845baa1 (patch) | |
tree | 6ec1e7520d9efee9713b411b50605ca019828388 /spec | |
parent | 1dea4d0cebda1b1ed7899b9cff1f0a3aa74ee09d (diff) | |
download | mixlib-shellout-00e8b1616252a8aee6b8646551946aaa5845baa1.tar.gz |
add a simple smoke testlcg/extract-mixlib-shellout
Signed-off-by: Lamont Granquist <lamont@scriptkiddie.org>
Diffstat (limited to 'spec')
-rw-r--r-- | spec/mixlib/shellout/helper_spec.rb | 30 |
1 files changed, 30 insertions, 0 deletions
diff --git a/spec/mixlib/shellout/helper_spec.rb b/spec/mixlib/shellout/helper_spec.rb new file mode 100644 index 0000000..977568a --- /dev/null +++ b/spec/mixlib/shellout/helper_spec.rb @@ -0,0 +1,30 @@ +require "spec_helper" +require "mixlib/shellout/helper" +require "logger" + +describe Mixlib::ShellOut::Helper do + class TestClass + include Mixlib::ShellOut::Helper + + # this is a hash-like object + def __config + {} + end + + # this is a train transport connection or nil + def __transport_connection + nil + end + + # this is a logger-like object + def __log + Logger.new(IO::NULL) + end + end + + let(:test_class) { TestClass.new } + + it "works to run a trivial ruby command" do + expect(test_class.shell_out("ruby -e 'exit 0'")).to be_kind_of(Mixlib::ShellOut) + end +end |