Sha256: 41bbf868520cda9b619390f13d0cd423bc6263d291116f60953bf1eba5c27a54
Contents?: true
Size: 1.15 KB
Versions: 1
Compression:
Stored size: 1.15 KB
Contents
require 'rubygems' require 'bundler' Bundler.setup require 'minitest' require 'mocha/mini_test' require 'minitest/rg' require 'minitest/autorun' ENV["RAILS_ENV"] = "test" RAILS_ROOT = "anywhere" require "active_support" require "active_model" require "action_controller" I18n.load_path << File.join(File.dirname(__FILE__), 'locales', 'en.yml') I18n.reload! class ApplicationController < ActionController::Base; end # Add IR to load path and load the main file $:.unshift File.expand_path(File.dirname(__FILE__) + '/../lib') require 'inherited_resources' ActionController::Base.view_paths = File.join(File.dirname(__FILE__), 'views') InheritedResources::Routes = ActionDispatch::Routing::RouteSet.new InheritedResources::Routes.draw do get ':controller(/:action(/:id))' get ':controller(/:action)' resources 'posts' root :to => 'posts#index' end ActionController::Base.send :include, InheritedResources::Routes.url_helpers # Add app base to load path $:.unshift File.expand_path(File.dirname(__FILE__) + '/../app/controllers') require 'inherited_resources/base' class ActiveSupport::TestCase setup do @routes = InheritedResources::Routes end end
Version data entries
1 entries across 1 versions & 1 rubygems
Version | Path |
---|---|
inherited_resources-1.5.1 | test/test_helper.rb |