Permalink
Browse files

tests may be run with `rake`, expand_path no necessary

  • Loading branch information...
1 parent e4da90d commit 45a714da33f1e8e00bd2e80417fa9916fd9b5309 @tenderlove tenderlove committed Mar 20, 2012
Showing with 14 additions and 4 deletions.
  1. +10 −0 Rakefile
  2. +1 −1 lib/multipart_parser/reader.rb
  3. +3 −3 test/multipart_parser/parser_test.rb
View
@@ -0,0 +1,10 @@
+require 'rake/testtask'
+
+Rake::TestTask.new do |t|
+ t.libs << 'test'
+ t.test_files = FileList['test/**/*_test.rb']
+ t.verbose = true
+ t.warning = true
+end
+
+task :default => :test
@@ -1,4 +1,4 @@
-require File.expand_path('../parser', __FILE__)
+require 'multipart_parser/parser'
module MultipartParser
class NotMultipartError < StandardError; end;
@@ -1,6 +1,6 @@
require 'test/unit'
-require File.dirname(__FILE__) + "/../../lib/multipart_parser/parser"
-require File.dirname(__FILE__) + "/../fixtures/multipart"
+require "multipart_parser/parser"
+require "fixtures/multipart"
module MultipartParser
class ParserTest < Test::Unit::TestCase
@@ -85,7 +85,7 @@ def test_fixtures
end
end
unless got_error
- assert true, end_called
+ assert_equal true, end_called
assert_equal fixture.parts, parts
else
assert fixture.expect_error,

0 comments on commit 45a714d

Please sign in to comment.