Skip to content

Commit

Permalink
use consistent relative require for test/helper
Browse files Browse the repository at this point in the history
  • Loading branch information
rtomayko committed Mar 5, 2011
1 parent 19506b1 commit 3f1a8df
Show file tree
Hide file tree
Showing 11 changed files with 13 additions and 11 deletions.
2 changes: 1 addition & 1 deletion test/helper.rb
@@ -1,4 +1,4 @@
rootdir = File.dirname(File.dirname(__FILE__))
rootdir = File.expand_path('../../lib', __FILE__)
$LOAD_PATH.unshift "#{rootdir}/lib"

require 'test/unit'
Expand Down
3 changes: 2 additions & 1 deletion test/suite.rb
@@ -1,4 +1,5 @@
require File.expand_path('../helper', __FILE__)
require 'test/unit'

Dir["#{File.dirname(__FILE__)}/test_*.rb"].
Dir[File.expand_path('../test_*.rb', __FILE__)].
each { |file| require file }
2 changes: 1 addition & 1 deletion test/test_basics.rb
@@ -1,4 +1,4 @@
require File.dirname(__FILE__) + '/helper'
require File.expand_path('../helper', __FILE__)

class RoccoBasicTests < Test::Unit::TestCase
def test_rocco_exists_and_is_instancable
Expand Down
2 changes: 1 addition & 1 deletion test/test_block_comments.rb
@@ -1,4 +1,4 @@
require File.dirname(__FILE__) + '/helper'
require File.expand_path('../helper', __FILE__)

class RoccoBlockCommentTest < Test::Unit::TestCase
def test_basics
Expand Down
2 changes: 1 addition & 1 deletion test/test_comment_normalization.rb
@@ -1,4 +1,4 @@
require File.dirname(__FILE__) + '/helper'
require File.expand_path('../helper', __FILE__)

class RoccoCommentNormalization < Test::Unit::TestCase
def test_normal_comments
Expand Down
2 changes: 1 addition & 1 deletion test/test_commentchar_detection.rb
@@ -1,4 +1,4 @@
require File.dirname(__FILE__) + '/helper'
require File.expand_path('../helper', __FILE__)

class RoccoAutomaticCommentChars < Test::Unit::TestCase
def test_basic_detection
Expand Down
2 changes: 1 addition & 1 deletion test/test_descriptive_section_names.rb
@@ -1,4 +1,4 @@
require File.dirname(__FILE__) + '/helper'
require File.expand_path('../helper', __FILE__)

class RoccoDescriptiveSectionNamesTests < Test::Unit::TestCase
def test_section_name
Expand Down
2 changes: 1 addition & 1 deletion test/test_language_detection.rb
@@ -1,4 +1,4 @@
require File.dirname(__FILE__) + '/helper'
require File.expand_path('../helper', __FILE__)

class RoccoLanguageDetection < Test::Unit::TestCase
def test_basic_detection
Expand Down
3 changes: 2 additions & 1 deletion test/test_reported_issues.rb
@@ -1,4 +1,5 @@
require File.dirname(__FILE__) + '/helper'
# encoding: utf-8
require File.expand_path('../helper', __FILE__)

class RoccoIssueTests < Test::Unit::TestCase
def test_issue07_incorrect_parsing_in_c_mode
Expand Down
2 changes: 1 addition & 1 deletion test/test_skippable_lines.rb
@@ -1,4 +1,4 @@
require File.dirname(__FILE__) + '/helper'
require File.expand_path('../helper', __FILE__)

class RoccoSkippableLines < Test::Unit::TestCase
def test_shebang_first_line
Expand Down
2 changes: 1 addition & 1 deletion test/test_source_list.rb
@@ -1,4 +1,4 @@
require File.dirname(__FILE__) + '/helper'
require File.expand_path('../helper', __FILE__)

class RoccoSourceListTests < Test::Unit::TestCase
def test_flat_sourcelist
Expand Down

0 comments on commit 3f1a8df

Please sign in to comment.