diff --git a/.github/ISSUE_TEMPLATE.md b/.github/ISSUE_TEMPLATE.md deleted file mode 100644 index 82c59bb..0000000 --- a/.github/ISSUE_TEMPLATE.md +++ /dev/null @@ -1,16 +0,0 @@ -### Steps to reproduce - - -[reproduction script]: https://github.com/thoughtbot/factory_bot/blob/master/.github/REPRODUCTION_SCRIPT.rb - -### Expected behavior - - -### Actual behavior - - -### System configuration -**factory_bot version**: -**rails version**: -**ruby version**: diff --git a/.github/ISSUE_TEMPLATE/bug_report.md b/.github/ISSUE_TEMPLATE/bug_report.md new file mode 100644 index 0000000..0cdc1ae --- /dev/null +++ b/.github/ISSUE_TEMPLATE/bug_report.md @@ -0,0 +1,38 @@ +--- +name: Bug report +about: Create a report to help us improve +title: '' +labels: 'bug' +assignees: '' + +--- + + + +### Description + + + +### Reproduction Steps + + + + + +### Expected behavior + + + +### Actual behavior + + + +### System configuration +**factory_bot version**: +**rails version**: +**ruby version**: diff --git a/.github/ISSUE_TEMPLATE/feature_request.md b/.github/ISSUE_TEMPLATE/feature_request.md new file mode 100644 index 0000000..de013ab --- /dev/null +++ b/.github/ISSUE_TEMPLATE/feature_request.md @@ -0,0 +1,28 @@ +--- +name: Feature request +about: Suggest an idea for this project +title: '' +labels: 'feature' +assignees: '' + +--- + + + +### Problem this feature will solve + + + +### Desired solution + + + +## Alternatives considered + + + +## Additional context + + diff --git a/.github/REPRODUCTION_SCRIPT.rb b/.github/REPRODUCTION_SCRIPT.rb index 39a3b57..e91aacc 100644 --- a/.github/REPRODUCTION_SCRIPT.rb +++ b/.github/REPRODUCTION_SCRIPT.rb @@ -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 `