Script 'mail_helper' called by obssrc
Hello community,

here is the log from the commit of package rubygem-formatador for 
openSUSE:Factory checked in at 2021-06-25 15:01:32
++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
Comparing /work/SRC/openSUSE:Factory/rubygem-formatador (Old)
 and      /work/SRC/openSUSE:Factory/.rubygem-formatador.new.2625 (New)
++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++

Package is "rubygem-formatador"

Fri Jun 25 15:01:32 2021 rev:2 rq:902273 version:0.3.0

Changes:
--------
--- /work/SRC/openSUSE:Factory/rubygem-formatador/rubygem-formatador.changes    
2019-07-02 10:37:56.522540381 +0200
+++ 
/work/SRC/openSUSE:Factory/.rubygem-formatador.new.2625/rubygem-formatador.changes
  2021-06-25 15:02:16.128219705 +0200
@@ -1,0 +2,32 @@
+Thu Jun 24 17:23:35 UTC 2021 - Stephan Kulow <[email protected]>
+
+updated to version 0.3.0
+ see installed changelog.txt
+
+  v0.3.0 06/17/21
+  ===============
+  
+  add travis badge to readme
+  change readme to md
+  fix markdown readme
+  fix travis badge
+  monkey-patch StringIO to try and fix jruby build
+  override tty? for jruby build
+  fix copyright statement
+  use unicode.width instead of string.length
+  remove unicode from requirements, use only if loaded
+  display datum who's value is a FalseClass
+  more colors with syntax-specific code/length limitations
+  better code visualization in readme
+  update readme
+  remove broken rubinius build from CI
+  fix length method to detect multibyte char width
+  fix test for table with multi byte chars
+  support multibyte characters
+  update CI to 2.2.7, 2.3.4, and 2.4.1
+  drop rubyforge_project from gemspec and rakefile
+  change github reference to https
+  change readme.rdoc to readme.md in gemspec
+  
+
+-------------------------------------------------------------------

Old:
----
  formatador-0.2.5.gem

New:
----
  formatador-0.3.0.gem

++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++

Other differences:
------------------
++++++ rubygem-formatador.spec ++++++
--- /var/tmp/diff_new_pack.NGSQIl/_old  2021-06-25 15:02:16.520220184 +0200
+++ /var/tmp/diff_new_pack.NGSQIl/_new  2021-06-25 15:02:16.524220188 +0200
@@ -1,7 +1,7 @@
 #
 # spec file for package rubygem-formatador
 #
-# Copyright (c) 2019 SUSE LINUX GmbH, Nuernberg, Germany.
+# Copyright (c) 2021 SUSE LLC
 #
 # All modifications and additions to the file contributed by third parties
 # remain the property of their copyright owners, unless otherwise agreed
@@ -12,7 +12,7 @@
 # license that conforms to the Open Source Definition (Version 1.9)
 # published by the Open Source Initiative.
 
-# Please submit bugfixes or comments via http://bugs.opensuse.org/
+# Please submit bugfixes or comments via https://bugs.opensuse.org/
 #
 
 
@@ -24,16 +24,16 @@
 #
 
 Name:           rubygem-formatador
-Version:        0.2.5
+Version:        0.3.0
 Release:        0
 %define mod_name formatador
 %define mod_full_name %{mod_name}-%{version}
 BuildRoot:      %{_tmppath}/%{name}-%{version}-build
-BuildRequires:  ruby-macros >= 5
-BuildRequires:  %{ruby}
 BuildRequires:  %{rubygem gem2rpm}
 BuildRequires:  %{rubygem rdoc > 3.10}
-Url:            http://github.com/geemus/formatador
+BuildRequires:  %{ruby}
+BuildRequires:  ruby-macros >= 5
+URL:            https://github.com/geemus/formatador
 Source:         https://rubygems.org/gems/%{mod_full_name}.gem
 Source1:        gem2rpm.yml
 Summary:        STDOUT text formatting
@@ -42,13 +42,14 @@
 
 %description
 Ruby STDOUT text formatting
+
 %prep
 
 %build
 
 %install
 %gem_install \
-  --doc-files="LICENSE.md README.rdoc changelog.txt" \
+  --doc-files="LICENSE.md README.md changelog.txt" \
   -f
 
 %gem_packages

++++++ formatador-0.2.5.gem -> formatador-0.3.0.gem ++++++
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' old/README.md new/README.md
--- old/README.md       1970-01-01 01:00:00.000000000 +0100
+++ new/README.md       2021-06-17 16:03:25.000000000 +0200
@@ -0,0 +1,145 @@
+# formatador
+
+STDOUT text formatting
+
+[![Build 
Status](https://travis-ci.org/geemus/formatador.svg)](http://travis-ci.org/geemus/formatador)
+
+## Quick and dirty
+
+You can call class methods to print out single lines like this:
+
+```ruby
+Formatador.display_line('Hello World')
+```
+
+You use tags, similar to html, to set formatting options:
+
+```ruby
+Formatador.display_line('[green]Hello World[/]')
+```
+
+`[/]` resets everything to normal, colors are supported and `[_color_]` sets 
the background color.
+
+## Standard options
+
+* format - and adds color codes if STDOUT.tty? is true
+* display - calls format on the input and prints it
+* display_line - calls display, but adds on a newline (\n)
+* redisplay - Displays text, prepended with \r which will overwrite the last 
existing line
+
+## Extensions
+
+* display_table: takes an array of hashes. Each hash is a row, with the keys 
being the headers and values being the data. An optional second argument can 
specify which headers/columns to include and in what order they should appear.
+* display_compact_table: Same as display_table, execpt that split lines are 
not drawn by default in the body of the table. If you need a split line, put a 
:split constant in the body array.
+* redisplay_progressbar: takes the current and total values as its first two 
arguments and redisplays a progressbar (until current = total and then it 
display_lines). An optional third argument represents the start time and will 
add an elapsed time counter.
+
+### Progress Bar examples
+
+```ruby
+total    = 1000
+progress = Formatador::ProgressBar.new(total)
+
+1000.times do
+  progress.increment
+end
+
+#=> 978/1000  |************************************************* |
+
+# Change the color of the bar
+total    = 1000
+progress = Formatador::ProgressBar.new(total, :color => "light_blue")
+
+1000.times do
+  progress.increment
+end
+
+# Change the color of a completed progress bar
+total    = 1000
+progress = Formatador::ProgressBar.new(total) { |b| b.opts[:color] = "green" }
+
+1000.times do
+  progress.increment
+end
+```
+
+### Table examples
+
+```ruby
+table_data = [
+  { :name => "Joe",  :food => "Burger" },
+  { :name => "Bill", :food => "French fries" }
+]
+Formatador.display_table(table_data)
+
+#=> +------+--------------+
+#   | name | food         |
+#   +------+--------------+
+#   | Joe  | Burger       |
+#   +------+--------------+
+#   | Bill | French fries |
+#   +------+--------------+
+
+table_data = [
+  {
+    :name => "Joe",
+    :meal => {
+      :main_dish => "Burger",
+      :drink => "water"
+    }
+  },
+  {
+    :name => "Bill",
+    :meal => {
+      :main_dish => "Chicken",
+      :drink => "soda"
+    }
+  }
+]
+Formatador.display_table(table_data, [:name, :"meal.drink"])
+
+#=> +------+------------+
+#   | name | meal.drink |
+#   +------+------------+
+#   | Joe  | water      |
+#   +------+------------+
+#   | Bill | soda       |
+#   +------+------------+
+```
+
+## Indentation
+
+By initializing a formatador object you can keep track of indentation:
+
+```ruby
+formatador = Formatador.new
+formatador.display_line('one level of indentation')
+formatador.indent {
+  formatador.display_line('two levels of indentation')
+}
+formatador.display_line('one level of indentation')
+```
+
+## Copyright
+
+(The MIT License)
+
+Copyright (c) 2015 [geemus (Wesley Beary)](http://github.com/geemus)
+
+Permission is hereby granted, free of charge, to any person obtaining
+a copy of this software and associated documentation files (the
+"Software"), to deal in the Software without restriction, including
+without limitation the rights to use, copy, modify, merge, publish,
+distribute, sublicense, and/or sell copies of the Software, and to
+permit persons to whom the Software is furnished to do so, subject to
+the following conditions:
+
+The above copyright notice and this permission notice shall be
+included in all copies or substantial portions of the Software.
+
+THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND,
+EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
+MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND
+NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE
+LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION
+OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION
+WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' old/README.rdoc new/README.rdoc
--- old/README.rdoc     2014-05-23 16:18:04.000000000 +0200
+++ new/README.rdoc     1970-01-01 01:00:00.000000000 +0100
@@ -1,117 +0,0 @@
-= formatador
-
-STDOUT text formatting
-
-== Quick and dirty
-
-You can call class methods to print out single lines like this:
-
-  Formatador.display_line('Hello World')
-
-You use tags, similar to html, to set formatting options:
-
-  Formatador.display_line('[green]Hello World[/]')
-
-  [/] resets everything to normal, colors are supported and [_color_] sets the 
background color.
-
-== Standard options
-
-* format - and adds color codes if STDOUT.tty? is true
-* display - calls format on the input and prints it
-* display_line - calls display, but adds on a newline (\n)
-* redisplay - Displays text, prepended with \r which will overwrite the last 
existing line
-
-== Extensions
-
-* display_table: takes an array of hashes. Each hash is a row, with the keys 
being the headers and values being the data. An optional second argument can 
specify which headers/columns to include and in what order they should appear.
-* display_compact_table: Same as display_table, execpt that split lines are 
not drawn by default in the body of the table. If you need a split line, put a 
:split constant in the body array.
-* redisplay_progressbar: takes the current and total values as its first two 
arguments and redisplays a progressbar (until current = total and then it 
display_lines). An optional third argument represents the start time and will 
add an elapsed time counter.
-
-=== Progress Bar examples
-
-  total    = 1000
-  progress = ProgressBar.new(total)
-  1000.times do
-    progress.increment
-  end
-
-   978/1000  |************************************************* |
-
-  # Change the color of the bar
-
-  total    = 1000
-  progress = ProgressBar.new(total, :color => "light_blue")
-  1000.times do
-    progress.increment
-  end
-
-  # Change the color of a completed progress bar
-
-  total    = 1000
-  progress = ProgressBar.new(total) { |b| b.opts[:color] = "green" }
-  1000.times do
-    progress.increment
-  end
-
-=== Table examples
-
-  table_data = [{:name => "Joe", :food => "Burger"}, {:name => "Bill", :food 
=> "French fries"}]
-  Formatador.display_table(table_data)
-
-  +------+--------------+
-  | name | food         |
-  +------+--------------+
-  | Joe  | Burger       |
-  +------+--------------+
-  | Bill | French fries |
-  +------+--------------+
-
-  table_data = [
-    {:name => "Joe", :meal => {:main_dish => "Burger", :drink => "water"}}, 
-    {:name => "Bill", :meal => {:main_dish => "Chicken", :drink => "soda"}}
-  ]
-  Formatador.display_table(table_data, [:name, :"meal.drink"])
-
-  +------+------------+
-  | name | meal.drink |
-  +------+------------+
-  | Joe  | water      |
-  +------+------------+
-  | Bill | soda       |
-  +------+------------+
-
-== Indentation
-
-By initializing a formatador object you can keep track of indentation:
-
-  formatador = Formatador.new
-  formatador.display_line('one level of indentation')
-  formatador.indent {
-    formatador.display_line('two levels of indentation')
-  }
-  formatador.display_line('one level of indentation')
-
-== Copyright
-
-(The MIT License)
-
-Copyright (c) 2009 {geemus (Wesley Beary)}[http://github.com/geemus]
-
-Permission is hereby granted, free of charge, to any person obtaining
-a copy of this software and associated documentation files (the
-"Software"), to deal in the Software without restriction, including
-without limitation the rights to use, copy, modify, merge, publish,
-distribute, sublicense, and/or sell copies of the Software, and to
-permit persons to whom the Software is furnished to do so, subject to
-the following conditions:
-
-The above copyright notice and this permission notice shall be
-included in all copies or substantial portions of the Software.
-
-THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND,
-EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
-MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND
-NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE
-LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION
-OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION
-WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' old/Rakefile new/Rakefile
--- old/Rakefile        2014-05-23 16:18:04.000000000 +0200
+++ new/Rakefile        2021-06-17 16:03:25.000000000 +0200
@@ -21,10 +21,6 @@
   Date.today.to_s
 end
 
-def rubyforge_project
-  name
-end
-
 def gemspec_file
   "#{name}.gemspec"
 end
@@ -56,7 +52,7 @@
   sh "open coverage/index.html"
 end
 
-require 'rake/rdoctask'
+require 'rdoc/task'
 Rake::RDocTask.new do |rdoc|
   rdoc.rdoc_dir = 'rdoc'
   rdoc.title = "#{name} #{version}"
@@ -111,8 +107,6 @@
   replace_header(head, :name)
   replace_header(head, :version)
   replace_header(head, :date)
-  #comment this out if your rubyforge_project has a different name
-  replace_header(head, :rubyforge_project)
 
   # determine file list from git ls-files
   files = `git ls-files`.
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' old/changelog.txt new/changelog.txt
--- old/changelog.txt   2014-05-23 16:18:04.000000000 +0200
+++ new/changelog.txt   2021-06-17 16:03:25.000000000 +0200
@@ -1,3 +1,28 @@
+v0.3.0 06/17/21
+===============
+
+add travis badge to readme
+change readme to md
+fix markdown readme
+fix travis badge
+monkey-patch StringIO to try and fix jruby build
+override tty? for jruby build
+fix copyright statement
+use unicode.width instead of string.length
+remove unicode from requirements, use only if loaded
+display datum who's value is a FalseClass
+more colors with syntax-specific code/length limitations
+better code visualization in readme
+update readme
+remove broken rubinius build from CI
+fix length method to detect multibyte char width
+fix test for table with multi byte chars
+support multibyte characters
+update CI to 2.2.7, 2.3.4, and 2.4.1
+drop rubyforge_project from gemspec and rakefile
+change github reference to https
+change readme.rdoc to readme.md in gemspec
+
 v0.2.5 05/23/14
 ===============
 
Binary files old/checksums.yaml.gz and new/checksums.yaml.gz differ
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' old/formatador.gemspec new/formatador.gemspec
--- old/formatador.gemspec      2014-05-23 16:18:04.000000000 +0200
+++ new/formatador.gemspec      2021-06-17 16:03:25.000000000 +0200
@@ -13,9 +13,8 @@
   ## If your rubyforge_project name is different, then edit it and comment out
   ## the sub! line in the Rakefile
   s.name              = 'formatador'
-  s.version           = '0.2.5'
-  s.date              = '2014-05-23'
-  s.rubyforge_project = 'formatador'
+  s.version           = '0.3.0'
+  s.date              = '2021-06-17'
 
   ## Make sure your summary is short. The description may be as long
   ## as you like.
@@ -27,7 +26,8 @@
   ## a custom homepage, consider using your GitHub URL or the like.
   s.authors  = ["geemus (Wesley Beary)"]
   s.email    = '[email protected]'
-  s.homepage = "http://github.com/geemus/#{s.name}";
+  s.homepage = "https://github.com/geemus/#{s.name}";
+  s.license  = 'MIT'
 
   ## This gets added to the $LOAD_PATH so that 'lib/NAME.rb' can be required as
   ## require 'NAME.rb' or'/lib/NAME/file.rb' can be as require 'NAME/file.rb'
@@ -44,7 +44,7 @@
   ## Specify any RDoc options here. You'll want to add your README and
   ## LICENSE files to the extra_rdoc_files list.
   s.rdoc_options = ["--charset=UTF-8"]
-  s.extra_rdoc_files = %w[README.rdoc]
+  s.extra_rdoc_files = %w[README.md]
 
   ## List your runtime dependencies here. Runtime dependencies are those
   ## that are needed for an end user to actually USE your code.
@@ -53,6 +53,7 @@
   ## List your development dependencies here. Development dependencies are
   ## those that are only needed during development
   s.add_development_dependency('rake')
+  s.add_development_dependency('rdoc')
   s.add_development_dependency('shindo')
 
   ## Leave this section as-is. It will be automatically generated from the
@@ -64,7 +65,7 @@
     CONTRIBUTORS.md
     Gemfile
     LICENSE.md
-    README.rdoc
+    README.md
     Rakefile
     changelog.txt
     formatador.gemspec
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' old/lib/formatador/table.rb new/lib/formatador/table.rb
--- old/lib/formatador/table.rb 2014-05-23 16:18:04.000000000 +0200
+++ new/lib/formatador/table.rb 2021-06-17 16:03:25.000000000 +0200
@@ -80,7 +80,14 @@
   private
 
   def length(value)
-    value.to_s.gsub(PARSE_REGEX, '').length
+    if Module.const_defined?(:Unicode)
+      Unicode.width(value.to_s.gsub(PARSE_REGEX, ''))
+    else
+      value.to_s.gsub(PARSE_REGEX, '').chars.reduce(0) { |sum, char| sum += 
char.bytesize > 1 ? 2 : 1 }
+    end
+
+  rescue NotImplementedError
+    value.to_s.gsub(PARSE_REGEX, '').chars.reduce(0) { |sum, char| sum += 
char.bytesize > 1 ? 2 : 1 }
   end
 
   def calculate_datum(header, hash)
@@ -91,7 +98,7 @@
         datum = d[split] || d[split.to_sym] || ''
       end
     else
-      datum = hash[header] || ''
+      datum = hash.fetch(header, '')
     end
     datum
   end
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' old/lib/formatador.rb new/lib/formatador.rb
--- old/lib/formatador.rb       2014-05-23 16:18:04.000000000 +0200
+++ new/lib/formatador.rb       2021-06-17 16:03:25.000000000 +0200
@@ -3,7 +3,7 @@
 
 class Formatador
 
-  VERSION = '0.2.5'
+  VERSION = '0.3.0'
 
   STYLES = {
     :"\/"             => "0",
@@ -62,7 +62,7 @@
 
   def display(string = '')
     print(parse("[indent]#{string}"))
-    STDOUT.flush
+    $stdout.flush
     nil
   end
 
@@ -80,7 +80,7 @@
   end
 
   def parse(string)
-    if STDOUT.tty?
+    if $stdout.tty?
       string.gsub(PARSE_REGEX) { "\e[#{STYLES[$1.to_sym]}m" 
}.gsub(INDENT_REGEX) { indentation }
     else
       strip(string)
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' old/metadata new/metadata
--- old/metadata        2014-05-23 16:18:04.000000000 +0200
+++ new/metadata        2021-06-17 16:03:25.000000000 +0200
@@ -1,41 +1,55 @@
 --- !ruby/object:Gem::Specification
 name: formatador
 version: !ruby/object:Gem::Version
-  version: 0.2.5
+  version: 0.3.0
 platform: ruby
 authors:
 - geemus (Wesley Beary)
-autorequire: 
+autorequire:
 bindir: bin
 cert_chain: []
-date: 2014-05-23 00:00:00.000000000 Z
+date: 2021-06-17 00:00:00.000000000 Z
 dependencies:
 - !ruby/object:Gem::Dependency
   name: rake
   requirement: !ruby/object:Gem::Requirement
     requirements:
-    - - ! '>='
+    - - ">="
       - !ruby/object:Gem::Version
         version: '0'
   type: :development
   prerelease: false
   version_requirements: !ruby/object:Gem::Requirement
     requirements:
-    - - ! '>='
+    - - ">="
+      - !ruby/object:Gem::Version
+        version: '0'
+- !ruby/object:Gem::Dependency
+  name: rdoc
+  requirement: !ruby/object:Gem::Requirement
+    requirements:
+    - - ">="
+      - !ruby/object:Gem::Version
+        version: '0'
+  type: :development
+  prerelease: false
+  version_requirements: !ruby/object:Gem::Requirement
+    requirements:
+    - - ">="
       - !ruby/object:Gem::Version
         version: '0'
 - !ruby/object:Gem::Dependency
   name: shindo
   requirement: !ruby/object:Gem::Requirement
     requirements:
-    - - ! '>='
+    - - ">="
       - !ruby/object:Gem::Version
         version: '0'
   type: :development
   prerelease: false
   version_requirements: !ruby/object:Gem::Requirement
     requirements:
-    - - ! '>='
+    - - ">="
       - !ruby/object:Gem::Version
         version: '0'
 description: STDOUT text formatting
@@ -43,13 +57,13 @@
 executables: []
 extensions: []
 extra_rdoc_files:
-- README.rdoc
+- README.md
 files:
 - CONTRIBUTING.md
 - CONTRIBUTORS.md
 - Gemfile
 - LICENSE.md
-- README.rdoc
+- README.md
 - Rakefile
 - changelog.txt
 - formatador.gemspec
@@ -59,29 +73,28 @@
 - tests/basic_tests.rb
 - tests/table_tests.rb
 - tests/tests_helper.rb
-homepage: http://github.com/geemus/formatador
-licenses: []
+homepage: https://github.com/geemus/formatador
+licenses:
+- MIT
 metadata: {}
-post_install_message: 
+post_install_message:
 rdoc_options:
-- --charset=UTF-8
+- "--charset=UTF-8"
 require_paths:
 - lib
 required_ruby_version: !ruby/object:Gem::Requirement
   requirements:
-  - - ! '>='
+  - - ">="
     - !ruby/object:Gem::Version
       version: '0'
 required_rubygems_version: !ruby/object:Gem::Requirement
   requirements:
-  - - ! '>='
+  - - ">="
     - !ruby/object:Gem::Version
       version: '0'
 requirements: []
-rubyforge_project: formatador
-rubygems_version: 2.2.2
-signing_key: 
+rubygems_version: 3.2.15
+signing_key:
 specification_version: 2
 summary: Ruby STDOUT text formatting
 test_files: []
-has_rdoc: 
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' old/tests/table_tests.rb new/tests/table_tests.rb
--- old/tests/table_tests.rb    2014-05-23 16:18:04.000000000 +0200
+++ new/tests/table_tests.rb    2021-06-17 16:03:25.000000000 +0200
@@ -1,3 +1,4 @@
+# coding: utf-8
 Shindo.tests("Formatador: tables") do
 
 output = <<-OUTPUT
@@ -93,4 +94,22 @@
     end
   end
 
-end
\ No newline at end of file
+
+output = <<-OUTPUT
+    +------+
+    | [bold]a[/]    |
+    +------+
+    | 1    |
+    +------+
+    | ?????? |
+    +------+
+OUTPUT
+  output = Formatador.parse(output)
+
+  tests("#display_table([{:a => 1}, {:a => 2}])").returns(output) do
+    capture_stdout do
+      Formatador.display_table([{:a => 1}, {:a => "??????"}])
+    end
+  end
+
+end
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' old/tests/tests_helper.rb new/tests/tests_helper.rb
--- old/tests/tests_helper.rb   2014-05-23 16:18:04.000000000 +0200
+++ new/tests/tests_helper.rb   2021-06-17 16:03:25.000000000 +0200
@@ -5,6 +5,18 @@
 require 'shindo'
 require 'stringio'
 
+class IO
+  def tty?
+    true
+  end
+end
+
+class StringIO
+  def tty?
+    true
+  end
+end
+
 def capture_stdout
   old_stdout = $stdout
   new_stdout = StringIO.new

Reply via email to