summaryrefslogtreecommitdiff
path: root/spec/functional/shell_spec.rb
diff options
context:
space:
mode:
authordanielsdeleo <dan@opscode.com>2012-11-21 09:04:33 -0800
committerdanielsdeleo <dan@opscode.com>2012-11-21 09:04:33 -0800
commit2d69e943e18760b08a280cac55f02e1edca0b6e8 (patch)
treea9ffcd204e85d0859442be9a2217bec4c33dde81 /spec/functional/shell_spec.rb
parentde6440999fc365a762b82865d85a349c83cda8f5 (diff)
downloadchef-2d69e943e18760b08a280cac55f02e1edca0b6e8.tar.gz
hide `require 'pty'` from windows
Diffstat (limited to 'spec/functional/shell_spec.rb')
-rw-r--r--spec/functional/shell_spec.rb4
1 files changed, 3 insertions, 1 deletions
diff --git a/spec/functional/shell_spec.rb b/spec/functional/shell_spec.rb
index 8553c53ece..d4fe219258 100644
--- a/spec/functional/shell_spec.rb
+++ b/spec/functional/shell_spec.rb
@@ -18,7 +18,6 @@
require 'spec_helper'
require 'chef/version'
-require 'pty'
describe Chef::Shell do
@@ -28,6 +27,9 @@ describe Chef::Shell do
describe "smoke tests", :unix_only => true do
def run_chef_shell_with(options)
+ # Windows ruby installs don't (always?) have PTY,
+ # so hide the require here
+ require 'pty'
path_to_chef_shell = File.expand_path("../../../bin/chef-shell", __FILE__)
reader, writer, pid = PTY.spawn("#{path_to_chef_shell} #{options}")
yield writer if block_given?