Permalink
Browse files

changed LOLCOMMITS_ROOT to work for tests, don't need to create a gem…

… before testing now
  • Loading branch information...
1 parent 31814de commit bffd6b87e7bc9a14d19c26a1f46b6e01204e5a5a @prydonius prydonius committed Apr 21, 2012
Showing with 6 additions and 8 deletions.
  1. +1 −1 lib/lolcommits.rb
  2. +5 −7 test/test_lolcommits.rb
View
@@ -10,7 +10,7 @@
module Lolcommits
$home = ENV['HOME']
LOLBASEDIR = File.join $home, ".lolcommits"
- LOLCOMMITS_ROOT = Gem.loaded_specs['lolcommits'].full_gem_path
+ LOLCOMMITS_ROOT = File.join(File.dirname(__FILE__), '..')
def is_mac?
RUBY_PLATFORM.downcase.include?("darwin")
View
@@ -1,11 +1,9 @@
require 'test/unit'
-
-begin
- require 'lolcommits'
-rescue LoadError
- require 'rubygems'
- require 'lolcommits'
-end
+# Loads lolcommits directly from the lib folder so don't have to create
+# a gem before testing
+$LOAD_PATH.unshift(File.join(File.dirname(__FILE__), '..', 'lib'))
+$LOAD_PATH.unshift(File.dirname(__FILE__))
+require 'lolcommits'
include Lolcommits

0 comments on commit bffd6b8

Please sign in to comment.