diff options
author | Jay Mundrawala <jdmundrawala@gmail.com> | 2014-12-18 11:09:42 -0800 |
---|---|---|
committer | Jay Mundrawala <jdmundrawala@gmail.com> | 2014-12-18 11:09:42 -0800 |
commit | f09d8a9230550efe459a407e60cb6ccbc48d3f4f (patch) | |
tree | 97df5520bc3c88d022046cc710ab511509bac74b | |
parent | 77211bdafb783b9067aa1fb32cd8bfa026a9769f (diff) | |
parent | ddd69b602968928ed69ef13c2df4a481fcc66400 (diff) | |
download | mixlib-shellout-f09d8a9230550efe459a407e60cb6ccbc48d3f4f.tar.gz |
Merge pull request #81 from opscode/jdm/test-fixes
Get specs to pass on windows
-rw-r--r-- | Gemfile | 3 | ||||
-rw-r--r-- | appveyor.yml | 31 | ||||
-rw-r--r-- | lib/mixlib/shellout/windows.rb | 2 | ||||
-rw-r--r-- | spec/mixlib/shellout_spec.rb | 11 |
4 files changed, 38 insertions, 9 deletions
@@ -9,3 +9,6 @@ group(:test) do end +group(:development) do + gem 'pry' +end diff --git a/appveyor.yml b/appveyor.yml new file mode 100644 index 0000000..de4779c --- /dev/null +++ b/appveyor.yml @@ -0,0 +1,31 @@ +version: "master-{build}" + +os: Windows Server 2012 +platform: + - x64 + +environment: + matrix: + - ruby_version: "200" + - ruby_version: "193" + +clone_folder: c:\projects\mixlib-shellout +clone_depth: 1 +skip_tags: true +branches: + only: + - master + +install: + - SET PATH=C:\Ruby%ruby_version%\bin;%PATH% + - echo %PATH% + - ruby --version + - gem --version + - gem install bundler --quiet --no-ri --no-rdoc + - bundler --version + +build_script: + - bundle install + +test_script: + - bundle exec rspec diff --git a/lib/mixlib/shellout/windows.rb b/lib/mixlib/shellout/windows.rb index 137aaa9..1bc8b13 100644 --- a/lib/mixlib/shellout/windows.rb +++ b/lib/mixlib/shellout/windows.rb @@ -156,7 +156,7 @@ module Mixlib begin next_chunk = stdout_read.readpartial(READ_SIZE) @stdout << next_chunk - @live_stream << next_chunk if @live_stream + @live_stdout << next_chunk if @live_stdout rescue EOFError stdout_read.close open_streams.delete(stdout_read) diff --git a/spec/mixlib/shellout_spec.rb b/spec/mixlib/shellout_spec.rb index cb0a33d..00f12d6 100644 --- a/spec/mixlib/shellout_spec.rb +++ b/spec/mixlib/shellout_spec.rb @@ -456,19 +456,14 @@ describe Mixlib::ShellOut do let(:locale) { nil } context 'when running under Unix', :unix_only do - let(:parent_locale) { ENV['LC_ALL'].to_s.strip } - - it "should unset the parent process's locale" do + it "should unset the process's locale" do should eql("") end end context 'when running under Windows', :windows_only do - # On windows, if an environmental variable is not set, it returns the key - let(:parent_locale) { (ENV['LC_ALL'] || '%LC_ALL%').to_s.strip } - - it "should use the parent process's locale" do - should eql(parent_locale) + it "should unset process's locale" do + should eql('%LC_ALL%') end end end |