Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with HTTPS or Subversion.

Download ZIP

Loading…

Added a Rakefile with test task #1

Merged
merged 1 commit into from

2 participants

@tenderlove

tests may be run with rake, expand_path no longer necessary

@danabr danabr merged commit ee4768b into from
@danabr
Owner

Thanks Aaron!

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.
View
10 Rakefile
@@ -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
View
2  lib/multipart_parser/reader.rb
@@ -1,4 +1,4 @@
-require File.expand_path('../parser', __FILE__)
+require 'multipart_parser/parser'
module MultipartParser
class NotMultipartError < StandardError; end;
View
6 test/multipart_parser/parser_test.rb
@@ -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,
Something went wrong with that request. Please try again.