Skip to content

Commit

Permalink
fixed some dependency loading problems
Browse files Browse the repository at this point in the history
  • Loading branch information
Amos Elliston committed Jun 3, 2010
1 parent e680d0a commit 0742bce
Show file tree
Hide file tree
Showing 4 changed files with 7 additions and 7 deletions.
2 changes: 1 addition & 1 deletion lib/sweatshop.rb
Original file line number Diff line number Diff line change
Expand Up @@ -189,5 +189,5 @@ def constantize(str)
end

if defined?(RAILS_ROOT)
Dir.glob(RAILS_ROOT + '/app/workers/*.rb').each{|worker| require worker }
Dir.glob(RAILS_ROOT + '/app/workers/*.rb').each{|worker| require_or_load worker }
end
2 changes: 1 addition & 1 deletion test/hello_worker.rb
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
require File.dirname(__FILE__) + '/../lib/sweatshop'
require File.expand_path(File.dirname(__FILE__) + '/../lib/sweatshop')
class HelloWorker < Sweatshop::Worker
TEST_FILE = File.dirname(__FILE__) + '/test.txt' unless defined?(TEST_FILE)

Expand Down
6 changes: 3 additions & 3 deletions test/test_functional_worker.rb
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
require File.dirname(__FILE__) + '/../lib/sweatshop'
require File.dirname(__FILE__) + '/test_helper'
require File.dirname(__FILE__) + '/hello_worker'
require File.expand_path(File.dirname(__FILE__) + '/../lib/sweatshop')
require File.expand_path(File.dirname(__FILE__) + '/test_helper' )
require File.expand_path(File.dirname(__FILE__) + '/hello_worker' )

class WorkerTest < Test::Unit::TestCase

Expand Down
4 changes: 2 additions & 2 deletions test/test_sweatshop.rb
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
require File.dirname(__FILE__) + '/test_helper'
require File.dirname(__FILE__) + '/../lib/sweatshop'
require File.expand_path(File.dirname(__FILE__) + '/test_helper' )
require File.expand_path(File.dirname(__FILE__) + '/../lib/sweatshop')

class SweatshopTest < Test::Unit::TestCase
Sweatshop.workers = []
Expand Down

0 comments on commit 0742bce

Please sign in to comment.