Sha256: d9b23d81a56b854d151e98fd1e53bc49c993ca1fd3027d8e71cfe1c7642ab524

Contents?: true

Size: 987 Bytes

Versions: 3

Compression:

Stored size: 987 Bytes

Contents

require 'rubygems'
require 'bundler'

Bundler.setup

require 'test/unit'
require 'mocha'

ENV["RAILS_ENV"] = "test"
RAILS_ROOT = "anywhere"

require "active_support"
require "active_model"
require "action_controller"
require "rails/railtie"

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 'karsthammer-inherited_resources'

ActionController::Base.view_paths = File.join(File.dirname(__FILE__), 'views')

InheritedResources::Routes = ActionDispatch::Routing::RouteSet.new
InheritedResources::Routes.draw do
  match ':controller(/:action(/:id))'
  match ':controller(/:action)'
  resources 'posts'
end

ActionController::Base.send :include, InheritedResources::Routes.url_helpers

class ActiveSupport::TestCase
  setup do
    @routes = InheritedResources::Routes
  end
end

Version data entries

3 entries across 3 versions & 1 rubygems

Version Path
karsthammer-inherited_resources-1.2.2.1 test/test_helper.rb
karsthammer-inherited_resources-1.2.2 test/test_helper.rb
karsthammer-inherited_resources-1.2.1.1 test/test_helper.rb