test/test_middleware.rb in stackprof-0.2.11 vs test/test_middleware.rb in stackprof-0.2.12

- old
+ new

@@ -7,34 +7,34 @@ class StackProf::MiddlewareTest < MiniTest::Test def test_path_default StackProf::Middleware.new(Object.new) - assert_equal 'tmp', StackProf::Middleware.path + assert_equal 'tmp/', StackProf::Middleware.path end def test_path_custom - StackProf::Middleware.new(Object.new, { path: '/foo' }) + StackProf::Middleware.new(Object.new, { path: 'foo/' }) - assert_equal '/foo', StackProf::Middleware.path + assert_equal 'foo/', StackProf::Middleware.path end def test_save_default StackProf::Middleware.new(Object.new) StackProf.stubs(:results).returns({ mode: 'foo' }) - FileUtils.expects(:mkdir_p).with('tmp') + FileUtils.expects(:mkdir_p).with('tmp/') File.expects(:open).with(regexp_matches(/^tmp\/stackprof-foo/), 'wb') StackProf::Middleware.save end def test_save_custom - StackProf::Middleware.new(Object.new, { path: '/foo' }) + StackProf::Middleware.new(Object.new, { path: 'foo/' }) StackProf.stubs(:results).returns({ mode: 'foo' }) - FileUtils.expects(:mkdir_p).with('/foo') - File.expects(:open).with(regexp_matches(/^\/foo\/stackprof-foo/), 'wb') + FileUtils.expects(:mkdir_p).with('foo/') + File.expects(:open).with(regexp_matches(/^foo\/stackprof-foo/), 'wb') StackProf::Middleware.save end def test_enabled_should_use_a_proc_if_passed