diff --git a/lib/review/preprocessor.rb b/lib/review/preprocessor.rb index 5b7ac8cc2..b21b37f85 100644 --- a/lib/review/preprocessor.rb +++ b/lib/review/preprocessor.rb @@ -43,28 +43,6 @@ def lineno class Preprocessor include ErrorUtils - class Strip - def initialize(f) - @f = f - end - - def path - @f.path - end - - def lineno - @f.lineno - end - - def gets - @f.each_line do |line| - return "\#@\#\n" if /\A\#@/ =~ line - return line - end - nil - end - end - def initialize(repo, param) @repository = repo @config = param diff --git a/test/test_preprocessor.rb b/test/test_preprocessor.rb index d5a710a5d..c7e84c2e6 100644 --- a/test/test_preprocessor.rb +++ b/test/test_preprocessor.rb @@ -5,19 +5,5 @@ class PreprocessorStripTest < Test::Unit::TestCase include ReVIEW - def test_gets - f = StringIO.new '= Header' - s = Preprocessor::Strip.new(f) - expect = '= Header' - actual = s.gets - assert_equal expect, actual - end - - def test_gets_with_comment - f = StringIO.new '#@warn(write it later)' - s = Preprocessor::Strip.new(f) - expect = '#@#' + "\n" - actual = s.gets - assert_equal expect, actual - end + ## TODO: add tests end