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

Add issue template [ci skip]

I often find myself asking for more information about an issue and
especially for ways to reproduce bugs. This template and sample
reproduction script will hopefully help us get more information from the
beginning.
This commit is contained in:
Daniel Colson 2019-06-07 11:29:45 -04:00
parent 41b8ea8cfd
commit b077450725
2 changed files with 46 additions and 0 deletions

16
.github/ISSUE_TEMPLATE.md vendored Normal file
View file

@ -0,0 +1,16 @@
### 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**:

30
.github/REPRODUCTION_SCRIPT.rb vendored Normal file
View file

@ -0,0 +1,30 @@
require "bundler/inline"
gemfile(true) do
source "https://rubygems.org"
git_source(:github) { |repo| "https://github.com/#{repo}.git" }
gem "factory_bot", "~> 5.0"
end
require "factory_bot"
require "minitest/autorun"
class Post
attr_accessor :body
end
FactoryBot.define do
factory :post do
body { "Post body" }
end
end
class FactoryBotTest < Minitest::Test
def test_factory_bot_stuff
body_override = "Body override"
post = FactoryBot.build(:post, body: body_override)
assert_equal post.body, body_override
end
end