Skip to content

Commit

Permalink
update for backwards compatability that should work with rails 2.0.x …
Browse files Browse the repository at this point in the history
…also
  • Loading branch information
atmos committed Jun 1, 2009
1 parent ca1529f commit 3f349c6
Show file tree
Hide file tree
Showing 2 changed files with 10 additions and 3 deletions.
7 changes: 6 additions & 1 deletion init.rb
Original file line number Diff line number Diff line change
Expand Up @@ -2,5 +2,10 @@
require 'controllers/fitter_happier_controller'
controller_path = File.dirname(__FILE__) + '/lib/controllers'
$LOAD_PATH << controller_path
ActiveSupport::Dependencies.load_paths << controller_path

if defined?(ActiveSupport::Dependencies)
ActiveSupport::Dependencies.load_paths << controller_path
else
Dependencies.load_paths << controller_path
end
config.controller_paths << controller_path
6 changes: 4 additions & 2 deletions test/fitter_happier_test.rb
Original file line number Diff line number Diff line change
@@ -1,7 +1,9 @@
ENV['RAILS_ENV'] = 'test'
require File.expand_path(File.dirname(__FILE__) + '/../../../../test/test_helper')
require 'test_help'

class FitterHappierTest < Test::Unit::TestCase
class FitterHappierTest < ActionController::TestCase
#include ActionController::Assertions::RoutingAssertions
def setup
@controller = FitterHappierController.new
@request = ActionController::TestRequest.new
Expand Down Expand Up @@ -40,4 +42,4 @@ def test_routing_inclusion
assert_routing('/fitter_happier/site_check', :controller => 'fitter_happier', :action => 'site_check')
assert_routing('/fitter_happier/database_check', :controller => 'fitter_happier', :action => 'database_check')
end
end
end

0 comments on commit 3f349c6

Please sign in to comment.