mirror of
https://github.com/rails/rails.git
synced 2022-11-09 12:12:34 -05:00
Merge pull request #19818 from chancancode/generic_bug_report_template
Add a "generic" bug report template
This commit is contained in:
commit
a2bf755c61
2 changed files with 41 additions and 0 deletions
15
guides/bug_report_templates/generic_gem.rb
Normal file
15
guides/bug_report_templates/generic_gem.rb
Normal file
|
@ -0,0 +1,15 @@
|
|||
# Activate the gems you are reporting the issue against.
|
||||
gem 'activesupport', '4.2.0'
|
||||
require 'active_support'
|
||||
require 'active_support/core_ext/object/blank'
|
||||
require 'minitest/autorun'
|
||||
|
||||
# Ensure backward compatibility with Minitest 4
|
||||
Minitest::Test = MiniTest::Unit::TestCase unless defined?(Minitest::Test)
|
||||
|
||||
class BugTest < Minitest::Test
|
||||
def test_stuff
|
||||
assert "zomg".present?
|
||||
refute "".present?
|
||||
end
|
||||
end
|
26
guides/bug_report_templates/generic_master.rb
Normal file
26
guides/bug_report_templates/generic_master.rb
Normal file
|
@ -0,0 +1,26 @@
|
|||
unless File.exist?('Gemfile')
|
||||
File.write('Gemfile', <<-GEMFILE)
|
||||
source 'https://rubygems.org'
|
||||
gem 'rails', github: 'rails/rails'
|
||||
gem 'arel', github: 'rails/arel'
|
||||
GEMFILE
|
||||
|
||||
system 'bundle'
|
||||
end
|
||||
|
||||
require 'bundler'
|
||||
Bundler.setup(:default)
|
||||
|
||||
require 'active_support'
|
||||
require 'active_support/core_ext/object/blank'
|
||||
require 'minitest/autorun'
|
||||
|
||||
# Ensure backward compatibility with Minitest 4
|
||||
Minitest::Test = MiniTest::Unit::TestCase unless defined?(Minitest::Test)
|
||||
|
||||
class BugTest < Minitest::Test
|
||||
def test_stuff
|
||||
assert "zomg".present?
|
||||
refute "".present?
|
||||
end
|
||||
end
|
Loading…
Reference in a new issue