File: app.rb

package info (click to toggle)
ruby-hashie 5.0.0-3
  • links: PTS, VCS
  • area: main
  • in suites: forky, sid, trixie
  • size: 884 kB
  • sloc: ruby: 7,049; sh: 8; makefile: 6
file content (40 lines) | stat: -rw-r--r-- 749 bytes parent folder | download | duplicates (2)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
require 'action_controller/railtie'
require 'action_view/railtie'
require 'action_view/testing/resolvers'
require 'rails/test_unit/railtie'

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

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

PAGE = <<-HTML.freeze
<!DOCTYPE html>
<html>
<head>
  <title>TestApp</title>
  <%= csrf_meta_tags %>
</head>
<body>
  <h1>Hello, world!</h1>
</body>
</html>
HTML

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

  def index
    render inline: PAGE
  end
end

Bundler.require(:default, Rails.env)

RailsApp::Application.initialize!