Skip to content

Commit

Permalink
move debugging module into test_helper
Browse files Browse the repository at this point in the history
  • Loading branch information
baroquebobcat committed Jan 26, 2014
1 parent ea9d8ea commit 0099f67
Show file tree
Hide file tree
Showing 2 changed files with 11 additions and 10 deletions.
10 changes: 0 additions & 10 deletions test/jvm/bytecode_test_helper.rb
Original file line number Diff line number Diff line change
Expand Up @@ -170,18 +170,8 @@ def assert_raise_java(type, message=nil)
end
end

module DebuggingHelp
def with_finest_logging
Mirah::Logging::MirahLogger.level = Mirah::Logging::Level::FINEST
yield
ensure
Mirah::Logging::MirahLogger.level = Mirah::Logging::Level::INFO
end
end

class Test::Unit::TestCase
include JVMCompiler
include DebuggingHelp

def setup
@tmp_classes = Set.new
Expand Down
11 changes: 11 additions & 0 deletions test/test_helper.rb
Original file line number Diff line number Diff line change
Expand Up @@ -61,6 +61,17 @@ def assert_output(expected, &block)

end


module DebuggingHelp
def with_finest_logging
Mirah::Logging::MirahLogger.level = Mirah::Logging::Level::FINEST
yield
ensure
Mirah::Logging::MirahLogger.level = Mirah::Logging::Level::INFO
end
end

class Test::Unit::TestCase
include CommonAssertions
include DebuggingHelp
end

0 comments on commit 0099f67

Please sign in to comment.