Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with
or
.
Download ZIP

Loading…

Small patches to allow the tests to pass #13

Merged
merged 2 commits into from

2 participants

@gwolf

When building Gruff for the Debian packaging, I enabled the tests. Two tests were failing - test_scene had the files ordering wrong twice because the files were not ordered; test_line calls a method on Gruff::Line (#label_max_decimals) which is never mentioned in the sources, so I guess it's a leftover from previous versions.

Thanks,

@topfunky topfunky merged commit 9af0d75 into topfunky:master
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
This page is out of date. Refresh to see the latest.
Showing with 3 additions and 2 deletions.
  1. +1 −1  lib/gruff/scene.rb
  2. +1 −0  test/test_line.rb
  3. +1 −1  test/test_scene.rb
View
2  lib/gruff/scene.rb
@@ -133,7 +133,7 @@ class Gruff::Layer
def initialize(base_dir, folder_name)
@base_dir = base_dir.to_s
@name = folder_name.to_s
- @filenames = Dir.open(File.join(base_dir, folder_name)).entries.select { |file| file =~ /^[^.]+\.png$/ }
+ @filenames = Dir.open(File.join(base_dir, folder_name)).entries.select { |file| file =~ /^[^.]+\.png$/ }.sort
@selected_filename = select_default
end
View
1  test/test_line.rb
@@ -462,6 +462,7 @@ def test_jruby_error
g.legend_font_size = 12
g.marker_font_size = 16
g.hide_dots = false
+ g.label_max_decimals = 1
g.write('test/output/line_jruby_error.png')
end
View
2  test/test_scene.rb
@@ -51,7 +51,7 @@ def test_stormy_day
def test_layer
l = LayerStub.new(File.expand_path("../assets/city_scene", File.dirname(__FILE__)), "clouds")
- assert_equal %w(cloudy.png partly_cloudy.png stormy.png), l.filenames
+ assert_equal %w(cloudy.png partly_cloudy.png stormy.png), l.filenames.sort
l = LayerStub.new(File.expand_path("../assets/city_scene", File.dirname(__FILE__)), "grass")
assert_equal 'default.png', l.selected_filename
Something went wrong with that request. Please try again.