Permalink
Browse files

Random fixes

  • Loading branch information...
Niklas Ramhöj
Niklas Ramhöj committed Sep 3, 2010
1 parent bb8f722 commit 72f1cf3aba2c9286edd2c7b341fb3d0fe2ba8e85
View
@@ -1,6 +1,3 @@
-$:.unshift(File.dirname(__FILE__)) unless
- $:.include?(File.dirname(__FILE__)) || $:.include?(File.expand_path(File.dirname(__FILE__)))
-
# ===Scruffy Graphing Library for Ruby
#
# Author:: Brasten Sager
@@ -14,8 +11,6 @@
module Scruffy
end
-require 'rubygems'
-gem 'builder', '>= 2.0'
require 'builder'
require 'scruffy/helpers'
@@ -10,7 +10,7 @@ class RMagickRasterizer
def rasterize(svg, options={})
# I know this seems weird, I'm open to suggestions.
# I didn't want RMagick required unless absolutely necessary.
- require 'RMagick'
+ require 'rmagick'
image = Magick::Image::from_blob(svg)[0]
View
@@ -1,9 +1,3 @@
module Scruffy
- module VERSION #:nodoc:
- MAJOR = 0
- MINOR = 2
- TINY = 6
-
- STRING = [MAJOR, MINOR, TINY].join('.')
- end
+ VERSION = '0.2.6'
end
@@ -16,7 +16,7 @@ def blank_renderer
describe "A new Scruffy::Graph" do
include CustomRenderers
- setup do
+ before do
@graph = Scruffy::Graph.new
end
@@ -25,7 +25,7 @@ def blank_renderer
end
it "should be set to the keynote theme" do
- @graph.theme.class.should equal(Scruffy::Themes::Keynote)
+ @graph.theme.class.should == Scruffy::Themes::Standard
end
it "should have zero layers" do
@@ -131,7 +131,7 @@ def blank_renderer
context "A fully populated Graph" do
- setup do
+ before do
FileUtils.rm_f File.dirname(__FILE__) + '/*.png'
FileUtils.rm_f File.dirname(__FILE__) + '/*.jpg'
@@ -1,10 +0,0 @@
-describe "A Line layer" do
- setup do
- @layer = Scruffy::Layers::Line.new(:title => 'My Line Layer', :points => [100, 200, 300])
-
- svg = mock('svg')
- svg.should_receive(:polyline).once
- svg.should_receive(:circle).exactly(3).times
-
- end
-end
@@ -1,5 +1,4 @@
-require 'test/unit'
-require 'scruffy'
+require File.expand_path('test_helper', File.dirname(__FILE__))
class SimpleTheme < Scruffy::Themes::Base
def initialize
View
@@ -1,2 +1,8 @@
+$:.unshift File.join(File.dirname(__FILE__), '..', 'lib')
+
+require 'rubygems'
+require 'bundler/setup'
+
require 'test/unit'
-require File.dirname(__FILE__) + '/../lib/scruffy'
+require 'scruffy'
+

0 comments on commit 72f1cf3

Please sign in to comment.