1
0
Fork 0
mirror of https://github.com/rails/rails.git synced 2022-11-09 12:12:34 -05:00

Added bug report template for ActionController

[ci skip]
This commit is contained in:
Paul Nikitochkin 2013-08-21 23:09:06 +03:00
parent 9208338b0f
commit 9d9254f5e0
3 changed files with 99 additions and 4 deletions

View file

@ -0,0 +1,42 @@
# Activate the gem you are reporting the issue against.
gem 'rails', '4.0.0'
require 'rails'
require 'action_controller/railtie'
class TestApp < Rails::Application
config.root = File.dirname(__FILE__)
config.session_store :cookie_store, key: 'cookie_store_key'
config.secret_token = 'secret_token'
config.secret_key_base = 'secret_key_base'
config.logger = Logger.new($stdout)
Rails.logger = config.logger
routes.draw do
get '/' => 'test#index'
end
end
class TestController < ActionController::Base
def index
render text: 'Home'
end
end
require 'minitest/autorun'
require 'rack/test'
class BugTest < MiniTest::Unit::TestCase
include Rack::Test::Methods
def test_returns_success
get '/'
assert last_response.ok?
end
private
def app
Rails.application
end
end

View file

@ -0,0 +1,51 @@
unless File.exists?('Gemfile')
File.write('Gemfile', <<-GEMFILE)
source 'https://rubygems.org'
gem 'rails', github: 'rails/rails'
GEMFILE
system 'bundle'
end
require 'bundler'
Bundler.setup(:default)
require 'rails'
require 'action_controller/railtie'
class TestApp < Rails::Application
config.root = File.dirname(__FILE__)
config.session_store :cookie_store, key: 'cookie_store_key'
config.secret_token = 'secret_token'
config.secret_key_base = 'secret_key_base'
config.logger = Logger.new($stdout)
Rails.logger = config.logger
routes.draw do
get '/' => 'test#index'
end
end
class TestController < ActionController::Base
def index
render text: 'Home'
end
end
require 'minitest/autorun'
require 'rack/test'
class BugTest < Minitest::Test
include Rack::Test::Methods
def test_returns_success
get '/'
assert last_response.ok?
end
private
def app
Rails.application
end
end

View file

@ -30,12 +30,14 @@ At the minimum, your issue report needs a title and descriptive text. But that's
Then, don't get your hopes up! Unless you have a "Code Red, Mission Critical, the World is Coming to an End" kind of bug, you're creating this issue report in the hope that others with the same problem will be able to collaborate with you on solving it. Do not expect that the issue report will automatically see any activity or that others will jump to fix it. Creating an issue like this is mostly to help yourself start on the path of fixing the problem and for others to confirm it with an "I'm having this problem too" comment.
### Create a Self-Contained gist for Active Record Issues
### Create a Self-Contained gist for Active Record and Action Controller Issues
If you are filing a bug report for Active Record, please use
[this template for gems](https://github.com/rails/rails/blob/master/guides/bug_report_templates/active_record_gem.rb)
If you are filing a bug report, please use
[Active Record template for gems](https://github.com/rails/rails/blob/master/guides/bug_report_templates/active_record_gem.rb) or
[Action Controller template for gems](https://github.com/rails/rails/blob/master/guides/bug_report_templates/action_controller_gem.rb)
if the bug is found in a published gem, and
[this template for master](https://github.com/rails/rails/blob/master/guides/bug_report_templates/active_record_master.rb)
[Active Record template for master](https://github.com/rails/rails/blob/master/guides/bug_report_templates/active_record_master.rb) or
[Action Controller template for master](https://github.com/rails/rails/blob/master/guides/bug_report_templates/action_controller_master.rb)
if the bug happens in the master branch.
### Special Treatment for Security Issues