diff options
Diffstat (limited to 'test/irb/test_ruby_lex.rb')
-rw-r--r-- | test/irb/test_ruby_lex.rb | 13 |
1 files changed, 11 insertions, 2 deletions
diff --git a/test/irb/test_ruby_lex.rb b/test/irb/test_ruby_lex.rb index 0f7939d2e8..d618b01c31 100644 --- a/test/irb/test_ruby_lex.rb +++ b/test/irb/test_ruby_lex.rb @@ -1,11 +1,12 @@ $LOAD_PATH.unshift File.expand_path('../../lib', __FILE__) require 'irb' require 'rubygems' -require 'test/unit' require 'ostruct' +require_relative "helper" + module TestIRB - class TestRubyLex < Test::Unit::TestCase + class TestRubyLex < TestCase Row = Struct.new(:content, :current_line_spaces, :new_line_spaces, :nesting_level) class MockIO_AutoIndent @@ -20,6 +21,14 @@ module TestIRB end end + def setup + save_encodings + end + + def teardown + restore_encodings + end + def assert_indenting(lines, correct_space_count, add_new_line) lines = lines + [""] if add_new_line last_line_index = lines.length - 1 |