Sha256: db346c1863083409716a47ded5b14fe6c88a0a24f8da704df5651313bdd7f23b

Contents?: true

Size: 1 KB

Versions: 9

Compression:

Stored size: 1 KB

Contents

require 'action_controller/railtie'
require 'action_view/railtie'
require 'action_view/testing/resolvers'
require 'rails/test_unit/railtie'
require_relative 'some_site'

module RailsApp
  class Application < ::Rails::Application
    config.eager_load      = false
    config.secret_key_base = 'hashieintegrationtest'

    config.middleware.use OmniAuth::Builder do
      provider :some_site
    end

    routes.append do
      get '/' => 'application#index'
    end
  end
end

LAYOUT = <<-HTML
<!DOCTYPE html>
<html>
<head>
  <title>TestApp</title>
  <%= csrf_meta_tags %>
</head>
<body>
<%= yield %>
</body>
</html>
HTML

INDEX = '<h1>Hello, world!</h1>'

class ApplicationController < ActionController::Base
  include Rails.application.routes.url_helpers

  layout 'application'

  self.view_paths = [ActionView::FixtureResolver.new(
    'layouts/application.html.erb' => LAYOUT,
    'application/index.html.erb'   => INDEX
  )]

  def index
  end
end

Bundler.require(:default, Rails.env)

RailsApp::Application.initialize!

Version data entries

9 entries across 8 versions & 2 rubygems

Version Path
tdiary-5.0.8 vendor/bundle/gems/hashie-3.5.7/spec/integration/omniauth-oauth2/app.rb
hashie-3.5.7 spec/integration/omniauth-oauth2/app.rb
hashie-3.5.6 spec/integration/omniauth-oauth2/app.rb
tdiary-5.0.5 vendor/bundle/gems/hashie-3.5.5/spec/integration/omniauth-oauth2/app.rb
tdiary-5.0.5 vendor/bundle/gems/tdiary-5.0.4/vendor/bundle/gems/hashie-3.5.5/spec/integration/omniauth-oauth2/app.rb
tdiary-5.0.4 vendor/bundle/gems/hashie-3.5.5/spec/integration/omniauth-oauth2/app.rb
hashie-3.5.5 spec/integration/omniauth-oauth2/app.rb
hashie-3.5.4 spec/integration/omniauth-oauth2/app.rb
hashie-3.5.3 spec/integration/omniauth-oauth2/app.rb