[DRE-commits] [ruby-aruba] 53/98: Fixed specs for simple_table

Hideki Yamane henrich at moszumanska.debian.org
Tue Mar 22 12:20:39 UTC 2016


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

henrich pushed a commit to branch debian/sid
in repository ruby-aruba.

commit 98a88ed8d1fc4e172583d5746d73da46794d543e
Author: Dennis Günnewig <dg1 at ratiodata.de>
Date:   Mon Jan 4 12:17:55 2016 +0100

    Fixed specs for simple_table
---
 lib/aruba/platforms/simple_table.rb      | 2 +-
 spec/aruba/platform/simple_table_spec.rb | 4 ++--
 2 files changed, 3 insertions(+), 3 deletions(-)

diff --git a/lib/aruba/platforms/simple_table.rb b/lib/aruba/platforms/simple_table.rb
index 4ebc5fa..d6b6080 100644
--- a/lib/aruba/platforms/simple_table.rb
+++ b/lib/aruba/platforms/simple_table.rb
@@ -27,7 +27,7 @@ module Aruba
       #   The table
       def to_s
         longest_key = hash.keys.map(&:to_s).max_by(&:length)
-        return [] if longest_key.nil?
+        return '' if longest_key.nil?
 
         name_size  = longest_key.length
 
diff --git a/spec/aruba/platform/simple_table_spec.rb b/spec/aruba/platform/simple_table_spec.rb
index 26a95bc..e710b77 100644
--- a/spec/aruba/platform/simple_table_spec.rb
+++ b/spec/aruba/platform/simple_table_spec.rb
@@ -11,13 +11,13 @@ RSpec.describe '.simple_table' do
     end
     let(:rows) { ['# key1 => value', '# key2 => value'] }
 
-    it { expect(Aruba.platform.simple_table(hash)).to eq rows }
+    it { expect(Aruba.platform.simple_table(hash).to_s).to eq rows.join("\n") }
   end
 
   context 'when empty hash' do
     let(:hash) { {} }
     let(:rows) { [] }
 
-    it { expect(Aruba.platform.simple_table(hash)).to eq rows }
+    it { expect(Aruba.platform.simple_table(hash).to_s).to eq rows.join("\n") }
   end
 end

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



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