[DRE-commits] [ohai] 03/12: revert local change

Antonio Terceiro terceiro at moszumanska.debian.org
Sat Jun 13 18:36:39 UTC 2015


This is an automated email from the git hooks/post-receive script.

terceiro pushed a commit to branch master
in repository ohai.

commit 4f882b3ddb719e561d3f4d782fea14000eb491b0
Author: Antonio Terceiro <terceiro at debian.org>
Date:   Sat Jun 13 10:16:59 2015 -0300

    revert local change
---
 spec/unit/plugins/ruby_spec.rb | 19 +++----------------
 1 file changed, 3 insertions(+), 16 deletions(-)

diff --git a/spec/unit/plugins/ruby_spec.rb b/spec/unit/plugins/ruby_spec.rb
index e215c09..6c3a3de 100644
--- a/spec/unit/plugins/ruby_spec.rb
+++ b/spec/unit/plugins/ruby_spec.rb
@@ -16,7 +16,7 @@
 # limitations under the License.
 #
 
-require 'rubygems'
+
 require File.expand_path(File.dirname(__FILE__) + '/../../spec_helper.rb')
 
 ruby_bin = File.join(::RbConfig::CONFIG['bindir'], ::RbConfig::CONFIG['ruby_install_name'])
@@ -35,11 +35,7 @@ describe Ohai::System, "plugin ruby" do
     @ruby_ohai_data = @ruby_ohai_data_pristine.dup
   end
 
-  code = <<-EOS
-  require 'rbconfig'
-  require 'rubygems'
-  ruby_bin = File.join(::RbConfig::CONFIG['bindir'], ::RbConfig::CONFIG['ruby_install_name'])
-  data = {
+  {
     :platform => RUBY_PLATFORM,
     :version => RUBY_VERSION,
     :release_date => RUBY_RELEASE_DATE,
@@ -55,16 +51,7 @@ describe Ohai::System, "plugin ruby" do
     :gem_bin => [ ::Gem.default_exec_format % 'gem', 'gem' ].map{|bin| "#{::RbConfig::CONFIG['bindir']}/#{bin}"
       }.find{|bin| ::File.exists? bin},
     :ruby_bin => ruby_bin
-  }
-  puts data.inspect
-  EOS
-  program = Tempfile.new('ruby')
-  program.write(code)
-  program.close
-  data = eval(`ruby #{program.path}`)
-  program.unlink
-
-  data.each do |attribute, value|
+  }.each do |attribute, value|
     it "should have #{attribute} set" do
       @ruby_ohai_data[attribute].should eql(value)
     end

-- 
Alioth's /usr/local/bin/git-commit-notice on /srv/git.debian.org/git/pkg-ruby-extras/ohai.git



More information about the Pkg-ruby-extras-commits mailing list