Permalink
Browse files

Better implementation of test. Updated dependency on clbustos-rtf

  • Loading branch information...
1 parent 8cbbe5a commit 95388cd20b2bcff2ea9c6d868edb2a617e309d3e @clbustos committed May 3, 2010
Showing with 16 additions and 19 deletions.
  1. +3 −0 History.txt
  2. +1 −0 Manifest.txt
  3. +1 −1 lib/reportbuilder.rb
  4. +1 −0 test/helper_test.rb
  5. +2 −5 test/test_html.rb
  6. +2 −5 test/test_section.rb
  7. +6 −8 test/test_table.rb
View
@@ -1,3 +1,6 @@
+=== 1.2.5 / 2010-04-30
+* Changed dependency on clbustos-rtf to 0.3.0
+
=== 1.2.4 / 2010-04-30
* Bug fix on Rtf Builder for tables. Creation of hr generates an error
View
@@ -22,6 +22,7 @@ lib/reportbuilder/table.rb
lib/reportbuilder/table/htmlbuilder.rb
lib/reportbuilder/table/rtfbuilder.rb
lib/reportbuilder/table/textbuilder.rb
+test/helper_test.rb
test/test_html.rb
test/test_image.rb
test/test_reportbuilder.rb
@@ -51,7 +51,7 @@ class ReportBuilder
# Doesn't print a title if set to true
attr_accessor :no_title
# ReportBuilder version
- VERSION = '1.2.4'
+ VERSION = '1.2.5'
FormatNotFound=Class.new(Exception)
# Available formats
View
@@ -5,6 +5,7 @@
$rmagick=false
end
$:.unshift(File.dirname(__FILE__)+"/../lib")
+require 'nokogiri'
require 'minitest/unit'
require 'tmpdir'
require "reportbuilder"
View
@@ -1,11 +1,8 @@
-require "minitest/unit"
-$:.unshift(File.dirname(__FILE__)+"/../lib")
-require "reportbuilder"
+require(File.dirname(__FILE__)+"/helper_test.rb")
require 'fileutils'
require 'tmpdir'
-require 'nokogiri'
require 'tempfile'
-MiniTest::Unit.autorun
+
class TestReportbuilderHtml < MiniTest::Unit::TestCase
def setup
@tmpdir=Dir::mktmpdir
@@ -1,8 +1,5 @@
-require "minitest/unit"
-$:.unshift(File.dirname(__FILE__)+"/../lib")
-require "reportbuilder"
-require 'nokogiri'
-MiniTest::Unit.autorun
+require(File.dirname(__FILE__)+"/helper_test.rb")
+
class TestReportbuilderSection < MiniTest::Unit::TestCase
def setup
@name_section="Test Section"
View
@@ -1,9 +1,7 @@
-require "minitest/unit"
-$:.unshift(File.dirname(__FILE__)+"/../lib")
-require "reportbuilder"
-require 'nokogiri'
+require(File.dirname(__FILE__)+"/helper_test.rb")
+
+require 'tempfile'
-MiniTest::Unit.autorun
class TestReportbuilderTable < MiniTest::Unit::TestCase
def setup
super
@@ -54,11 +52,11 @@ def test_empty_table
end
def test_rtf
+ tempfile=Tempfile.new('test.rtf')
rb=ReportBuilder.new
rb.add(@table)
- rb.save_rtf("test.rtf")
-
-
+ rb.save_rtf(tempfile.path)
+
end
def test_table_text
tg=ReportBuilder::Table::TextBuilder.new(@mock_generator, @table)

0 comments on commit 95388cd

Please sign in to comment.