1
0
Fork 0
mirror of https://github.com/thoughtbot/factory_bot.git synced 2022-11-09 11:43:51 -05:00

Update issue templates [skip ci]

Closes #1375

This commit attempts to clarify the bug report issue template by:
  * Describing what the link to the reproduction step is
  * Adding TODOs to the reproduction script to make it more clear what
    needs to be changed

This commit also updates to use the modern template format, with both a
bug report template and a feature request template.
This commit is contained in:
Daniel Colson 2020-04-12 16:51:21 -04:00
parent 0bcb6151b8
commit c7b06a7821
4 changed files with 74 additions and 16 deletions

View file

@ -1,16 +0,0 @@
### Steps to reproduce
<!-- Be as specific as possible. A [reproduction script][] or sample application
to reproduce the problem are especially helpful -->
[reproduction script]: https://github.com/thoughtbot/factory_bot/blob/master/.github/REPRODUCTION_SCRIPT.rb
### Expected behavior
<!-- Tell us what should happen -->
### Actual behavior
<!-- Tell us what happens instead -->
### System configuration
**factory_bot version**:
**rails version**:
**ruby version**:

38
.github/ISSUE_TEMPLATE/bug_report.md vendored Normal file
View file

@ -0,0 +1,38 @@
---
name: Bug report
about: Create a report to help us improve
title: ''
labels: 'bug'
assignees: ''
---
<!-- By contributing to this project, you agree to abide by the thoughtbot Code
of Conduct: https://thoughtbot.com/open-source-code-of-conduct -->
### Description
<!-- A clear and concise description of what the bug is. -->
### Reproduction Steps
<!-- Steps for others to reproduce the bug. Be as specific as possible. A
reproduction script or link to a sample application that demonstrates the
problem are especially helpful. -->
<!-- You can create a reproduction script by copying this sample reproduction
script and adding whatever code is necessary to get a failing test case:
https://github.com/thoughtbot/factory_bot/blob/master/.github/REPRODUCTION_SCRIPT.rb -->
### Expected behavior
<!-- What you expected to happen. -->
### Actual behavior
<!-- What happened instead. -->
### System configuration
**factory_bot version**:
**rails version**:
**ruby version**:

View file

@ -0,0 +1,28 @@
---
name: Feature request
about: Suggest an idea for this project
title: ''
labels: 'feature'
assignees: ''
---
<!-- By contributing to this project, you agree to abide by the thoughtbot Code
of Conduct: https://thoughtbot.com/open-source-code-of-conduct -->
### Problem this feature will solve
<!-- A clear and concise description of what the problem is. Ex. When doing
[...] I find it difficult to [...] -->
### Desired solution
<!-- The feature or change that would solve the problem -->
## Alternatives considered
<!-- Any alternative solutions or features you've considered. -->
## Additional context
<!-- Add any other context about this feature request. -->

View file

@ -17,15 +17,19 @@ ActiveRecord::Base.establish_connection(adapter: "sqlite3", database: ":memory:"
ActiveRecord::Base.logger = Logger.new(STDOUT)
ActiveRecord::Schema.define do
# TODO: Update the schema to include the specific tables or columns necessary
# to reproduct the bug
create_table :posts, force: true do |t|
t.string :body
end
end
# TODO: Add any application specific code necessary to reproduce the bug
class Post < ActiveRecord::Base
end
FactoryBot.define do
# TODO: Write the factory definitions necessary to reproduce the bug
factory :post do
body { "Post body" }
end
@ -33,6 +37,8 @@ end
class FactoryBotTest < Minitest::Test
def test_factory_bot_stuff
# TODO: Write a failing test case to demonstrate what isn't working as
# expected
body_override = "Body override"
post = FactoryBot.build(:post, body: body_override)
@ -40,3 +46,5 @@ class FactoryBotTest < Minitest::Test
assert_equal post.body, body_override
end
end
# Run the tests with `ruby <filename>`