Permalink
Browse files

quick messing with load path

  • Loading branch information...
1 parent 2663854 commit 1022a42f954ef1cb11ba69c1b0114cb803b3db3a @technoweenie committed May 13, 2012
Showing with 12 additions and 11 deletions.
  1. +6 −4 lib/madrox.rb
  2. +2 −3 test/helper.rb
  3. +2 −2 test/repo_test.rb
  4. +2 −2 test/timeline_test.rb
View
@@ -1,8 +1,10 @@
+require 'grit'
+
module Madrox
VERSION = "0.3.0"
end
-$LOAD_PATH.unshift File.join(File.dirname(__FILE__), '..', 'vendor', 'grit', 'lib')
-require 'grit'
-require 'madrox/repo'
-require 'madrox/timeline'
+
+require File.expand_path('../madrox/repo', __FILE__)
+require File.expand_path('../madrox/timeline', __FILE__)
+
View
@@ -1,6 +1,5 @@
require 'test/unit'
-$LOAD_PATH.unshift File.join(File.dirname(__FILE__), '..', 'lib')
-require 'madrox'
+require File.expand_path('../../lib/madrox', __FILE__)
class MadroxTest < Test::Unit::TestCase
def fork_git_fixture(name, dest = :test)
@@ -18,4 +17,4 @@ def clear_git_fixtures(*fixtures)
def default_test
end
-end
+end
View
@@ -1,9 +1,9 @@
-require File.join(File.dirname(__FILE__), 'helper')
+require File.expand_path('../helper', __FILE__)
class RepoTest < MadroxTest
def test_repo_exists
assert !Madrox::Repo.new("foo").exist?
assert Madrox::Repo.new(
File.join(File.dirname(__FILE__), "fixtures/simple.git")).exist?
end
-end
+end
View
@@ -1,4 +1,4 @@
-require File.join(File.dirname(__FILE__), 'helper')
+require File.expand_path('../helper', __FILE__)
class TimelineTest < MadroxTest
def setup
@@ -95,4 +95,4 @@ def test_favoriting_a_tweet
assert_equal sha, @repo.grit.commit('user1-favorites').sha
end
-end
+end

0 comments on commit 1022a42

Please sign in to comment.