Skip to content

Commit

Permalink
reenabled tests
Browse files Browse the repository at this point in the history
  • Loading branch information
hukl committed Aug 14, 2010
1 parent 8a0733c commit 3a36097
Show file tree
Hide file tree
Showing 2 changed files with 8 additions and 6 deletions.
4 changes: 3 additions & 1 deletion lib/rig/http.rb
Expand Up @@ -38,10 +38,12 @@ def prepare_body
def multipart?
if defined? @multipart
@multipart
else
elsif @options[:body]
@multipart = @options[:body].values.any? do |element|
element.respond_to?( :read )
end
else
@multipart = false
end
end

Expand Down
10 changes: 5 additions & 5 deletions test/test_http.rb
Expand Up @@ -145,11 +145,11 @@ class TestHttp < Test::Unit::TestCase
assert !request.multipart?, "Should not be multipart"
end

#test "http object has accessible params" do
# get = HTTP.new( {:host => "localhost", :params => {"foo" => "bar"}} )
# assert_not_nil get.params
# assert_equal ({"foo" => "bar"}), get.params
#end
test "http object has accessible options" do
get = HTTP.new( {:host => "localhost", :query => {"foo" => "bar"}} )
assert_not_nil get.options
assert_equal ({"foo" => "bar"}), get.options[:query]
end

#test "http object without params specified returns empty params" do
# get = HTTP.new( {:host => "localhost"} )
Expand Down

0 comments on commit 3a36097

Please sign in to comment.