Sha256: 53e1be8bfd1dc1fa0e613ce048b3c5596be80a19ee22674e00a7fbc1bc1fa0d4
Contents?: true
Size: 1.25 KB
Versions: 4
Compression:
Stored size: 1.25 KB
Contents
# # Author:: Diego Algorta (diego@oboxodo.com) # Copyright:: Copyright (c) 2009 Diego Algorta # License:: Apache License, Version 2.0 # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. # You may obtain a copy of the License at # # http://www.apache.org/licenses/LICENSE-2.0 # # Unless required by applicable law or agreed to in writing, software # distributed under the License is distributed on an "AS IS" BASIS, # WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. # See the License for the specific language governing permissions and # limitations under the License. # require File.join(File.dirname(__FILE__), '..', '..', '/spec_helper.rb') describe Ohai::Mixin::Command, "popen4" do it "should default all commands to be run in the POSIX standard C locale" do Ohai::Mixin::Command.popen4("echo $LC_ALL") do |pid, stdin, stdout, stderr| stdin.close stdout.read.strip.should == "C" end end it "should respect locale when specified explicitly" do Ohai::Mixin::Command.popen4("echo $LC_ALL", :environment => {"LC_ALL" => "es"}) do |pid, stdin, stdout, stderr| stdin.close stdout.read.strip.should == "es" end end end
Version data entries
4 entries across 4 versions & 1 rubygems
Version | Path |
---|---|
ohai-0.5.0 | spec/ohai/mixin/command_spec.rb |
ohai-0.4.0 | spec/ohai/mixin/command_spec.rb |
ohai-0.3.6 | spec/ohai/mixin/command_spec.rb |
ohai-0.3.4 | spec/ohai/mixin/command_spec.rb |