Sha256: 4afdf6f90eb2c4ca6e5a1b9d62f6396c0d4d71adaf3980c3f2a5b749a2d5fa3a

Contents?: true

Size: 567 Bytes

Versions: 1

Compression:

Stored size: 567 Bytes

Contents

require 'active_support/all'
require 'action_controller'
require 'action_dispatch'

#
# Re-define the Rails module
#
module Rails
  #
  # Fake Rails application
  #
  class App
    def env_config
      {}
    end

    def routes
      return @routes if defined?(@routes)
      @routes = ActionDispatch::Routing::RouteSet.new
      @routes.draw do
        root 'home#index'
        resources :guitars
      end
      @routes
    end
  end

  def self.application
    @app ||= App.new
  end
end

Rails.application.routes.default_url_options[:host] = 'http://test.host'

Version data entries

1 entries across 1 versions & 1 rubygems

Version Path
fortress-0.1.0 spec/fixtures/application.rb