This is my recipe.rb:
require 'mixlib/shellout'
require "pry"
find = Mixlib::ShellOut.new("echo hostname -I")
find.run_command.stdout
What should I write it in my spec?
This is my recipe.rb:
require 'mixlib/shellout'
require "pry"
find = Mixlib::ShellOut.new("echo hostname -I")
find.run_command.stdout
What should I write it in my spec?
Copyright © 2021 Jogjafile Inc.
You don't need the echo command to get the output. you can directly run the command through
mixlib/shelloutand get then get the command output fromstdout.