test/test_middleware.rb in stackprof-0.2.7 vs test/test_middleware.rb in stackprof-0.2.8
- old
+ new
@@ -1,12 +1,12 @@
$:.unshift File.expand_path('../../lib', __FILE__)
require 'stackprof'
require 'stackprof/middleware'
-require 'test/unit'
+require 'minitest/autorun'
require 'mocha/setup'
-class StackProf::MiddlewareTest < Test::Unit::TestCase
+class StackProf::MiddlewareTest < MiniTest::Test
def test_path_default
StackProf::Middleware.new(Object.new)
assert_equal 'tmp', StackProf::Middleware.path
@@ -53,11 +53,15 @@
env = Hash.new { false }
StackProf::Middleware.new(Object.new, enabled: enable_proc)
refute StackProf::Middleware.enabled?(env)
- env = Hash.new { true}
+ env = Hash.new { true }
StackProf::Middleware.new(Object.new, enabled: enable_proc)
assert StackProf::Middleware.enabled?(env)
end
+ def test_raw
+ StackProf::Middleware.new(Object.new, raw: true)
+ assert StackProf::Middleware.raw
+ end
end