Skip to content
Browse files

Upgraded to Rails 3.0.0.rc and RSpec beta 19.

Changed all instances of Rails::Application to Rails.application to
remove deprecation warnings.
  • Loading branch information...
1 parent de6d8f0 commit e804355a14986d0e76c22fc7cf721a4556de5f62 Greg Bell committed Aug 3, 2010
Showing with 11 additions and 12 deletions.
  1. +1 −0 .gitignore
  2. +6 −6 Gemfile
  3. +1 −1 lib/active_admin.rb
  4. +3 −5 spec/spec_helper.rb
View
1 .gitignore
@@ -22,3 +22,4 @@ pkg
.bundle
spec/rails
*.sqlite3-journal
+Gemfile.lock
View
12 Gemfile
@@ -2,14 +2,14 @@
source 'http://rubygems.org'
# Rails & ActiveAdmin Dependencies
-gem 'rails', '3.0.0.beta4'
-gem 'sqlite3-ruby', :require => 'sqlite3'
-gem 'haml', '3.0.4'
+gem 'rails', '3.0.0.rc'
+gem 'sqlite3-ruby', :require => 'sqlite3'
+gem 'haml', '3.0.15'
gem 'formtastic', :git => "git://github.com/justinfrench/formtastic.git", :branch => 'rails3'
gem 'will_paginate', :git => "git://github.com/mislav/will_paginate.git", :branch => 'rails3'
-gem 'meta_search', :git => "git://github.com/ernie/meta_search.git"
+gem "meta_search", '0.5.4'
gem 'inherited_views'
# Testing Dependencies
-gem 'rspec', '2.0.0.beta.13'
-gem 'rspec-rails', '2.0.0.beta.13'
+gem 'rspec', '2.0.0.beta.19'
+gem 'rspec-rails', '2.0.0.beta.19'
View
2 lib/active_admin.rb
@@ -80,7 +80,7 @@ def init!
ActiveAdmin.unload!
# Because every time we load, the routes may have changed
# we must ensure to load the routes each request (in dev)
- Rails::Application.routes_reloader.reload!
+ Rails.application.reload_routes!
end
end
View
8 spec/spec_helper.rb
@@ -18,7 +18,7 @@ def self.load!
# Sometimes we need to reload the routes within
# the application to test them out
def reload_routes!
- Rails::Application.routes_reloader.reload!
+ Rails.application.reload_routes!
end
# Sets up a describe block where you can render controller
@@ -38,9 +38,7 @@ def action_view(assigns = {})
controller = ActionView::TestCase::TestController.new
ActionView::Base.send :include, ActionView::Helpers
ActionView::Base.send :include, ActiveAdmin::ViewHelpers
- view = ActionView::Base.new(ActionController::Base.view_paths, assigns, controller)
- view._router = controller._router
- view
+ ActionView::Base.new(ActionController::Base.view_paths, assigns, controller)
end
end
@@ -64,7 +62,7 @@ def action_view(assigns = {})
include ActiveAdminIntegrationSpecHelper
# Force the routes to be reloaded
- Rails::Application.routes_reloader.reload!
+ Rails.application.reload_routes!
# Don't add asset cache timestamps. Makes it easy to integration
# test for the presence of an asset file

0 comments on commit e804355

Please sign in to comment.
Something went wrong with that request. Please try again.