1
0
Fork 0
mirror of https://github.com/thoughtbot/factory_bot_rails.git synced 2022-11-09 11:49:18 -05:00
Commit graph

23 commits

Author SHA1 Message Date
Daniel Colson
ce8bfb409b Run standardrb
This commit applies the changes from running `standardrb --fix`
2020-06-10 17:13:56 -04:00
Alex Golubenko
4c63a128a7
Add skip options for test app creation (#371)
Prior to this commit the tests generated a full rails app, but didn't need many of the libraries included by default. Unneeded gems make the test suite slower, and increase the chance of getting errors when new versions of each gem come out.
2020-04-04 09:12:04 -04:00
Alex Golubenko
49ed76c58c
Add skipping of bundle install for test app (#372)
This will hopefully allow us to avoid installing any of the development dependencies on Travis
2020-04-03 22:08:44 -04:00
Daniel Colson
5c52981fcc
Update rails versions on Travis (#367)
This commit gets the Travis build passing by:

- Removing Rails 4.2 so we don't have to deal with bundler < 2 anymore
- Bumping to latest Rails versions
- Explicitly listing all gems that appear in the default Rails Gemfile
- Avoiding bootsnap and javascript, since they aren't relevant to these tests

Co-authored-by: alex <alexandr1golubenko@gmail.com>
2020-03-29 11:51:41 -04:00
Daniel Colson
0b24977c34
Write a failing test for reloading with Spring (#330)
* Write a failing test for reloading with Spring

This test captures what I think is going on in
https://github.com/thoughtbot/factory_bot_rails/issues/323

Currently the factory_bot_rails reloader only reloads factory
definitions when the definition files have changes (using
`execute_if_updated`).

This can cause problems when editing an application file without also
editing a factory_bot definition file. Rails will reload the entire
application, but will not reload the definitions. This causes
factory_bot to have references to classes that were unloaded from the
Rails application and replaced with new classes.

https://github.com/thoughtbot/factory_bot_rails/pull/329 replaces
`execute_if_updated` with `execute` so that factory_bot_rails will
reload the definition files whenever anything in the application is
changed. Hopefully that PR will get this test to pass!
2019-04-05 13:32:17 -04:00
Daniel Colson
c84e6b2aa2 Fix remaining RuboCop TODOs 2018-10-03 21:40:07 -04:00
Alex
124c89b264 Address todos generated by rubocop for files in the features/ directory. (#297)
This partially addresses #293. Since rubocop generated quite a few todos, the commits addressing them are split up into a few different PRs that cover different files.
2018-09-28 15:23:52 -04:00
Avielle Wolfe
c5d11518d7 Rename all girl -> bot
* Rename files and code
* Change factory_girl dependency to factory_bot

This change will bring _rails name in line with factory_bot
c716ce01b4
2017-10-20 18:21:52 -04:00
Kevin Reintjes
5b17b5777b Add filename_proc option to Factory generator 2015-03-16 09:02:12 -04:00
Dan Croak
00cb2eabb1 Test against Rails 3.2, 4.0, 4.1
* Remove gemfiles from version control to match same testing style as
  Clearance and Suspenders.
* MiniTest does not need to be manually included as it is automatically
  included by Rails by default.
* Add spring for Rails 4.1.
* Disable Spring to get specs to pass on Rails 4.1.
* Add therubyrhino for JRuby.
* Remove old references to Rails 3.
* Fix JRuby test where output is "1 runs", not "1 tests".
* Remove Rails 3.0 reference to "turn".
2014-05-27 00:41:24 -07:00
Joshua Clayton
9d3df8ce94 Fix bug when configuring FactoryGirl and RSpec fixture dir
Closes #90, #88, #84
2013-02-05 09:19:40 -05:00
Matt Jankowski
a179d7f366 Newer versions of activerecord-jdbcsqlite3-adapter work without a specially named db driver in database.yml 2013-01-07 15:49:11 -05:00
Matt Jankowski
51cc9ed402 Instead of modifying the environment, run bundle install in a new process
JRuby does not support setting/unsetting environment variables.

Thus, we will launch an entirely new process without the parents env when
we run `bundle install` inside the generated rails apps, forcing them to
use their own Gemfile, instead of the BUNDLE_GEMFILE setting from the main
gem codebase.
2012-12-21 11:08:37 -05:00
Matt Jankowski
cc921652d0 Rails 3.1 adds the Turn gem to the gemfile, which impacts the format that results are reported in, and we must verify that format 2012-12-19 15:04:29 -05:00
Matt Jankowski
95eaa4af9a Improve the way we switch between project Gemfile and appraisal gemfiles
Previously, the railties required by the project gemspec was in conflict with
the rails versions being pulled in by Appraisal.

There were situations where a newer rails app was generated by `rails new...`
even though the Appraisal gemfiles/ value should have been setting it correctly.

We need to be able to use the versions of things specified in the appraisal gemfiles/
specify the version of rails for the initial generation of the applications,
but subsequently allow those applications to point to the `Gemfile` within
the newly generated rails apps, rather than wherever BUNDLE_GEMFILE was previously
set by Appraisal.
2012-12-19 14:46:21 -05:00
Matt Jankowski
b7f5c5d9d0 Simplify the jdbc sqlite3 driver replacement 2012-12-19 14:31:49 -05:00
Matt Jankowski
742f38dc9e jruby needs a separate sqlite3 adapter 2012-12-13 16:41:16 -05:00
Joshua Clayton
bcbdc4558c Initial support for MiniTest
Closes #68, #75
2012-12-10 11:29:57 -05:00
Joshua Clayton
1c6975c185 Allow a custom directory for factories be specified
Closes #73
2012-12-07 11:48:05 -05:00
Eric Hu
e85aa34ace Add suffix option for Rails config
Closes #78
2012-12-07 10:40:51 -05:00
Mike Gehard
97222f2b58 Allow factory_girl_rails to auto configure factory girl as the fixture replacement mechanism. 2011-09-24 06:58:59 -06:00
Joe Ferris
98b00ce10a Use aruba (based on patches from Mike Gehard) 2010-11-11 11:44:41 -05:00
Joe Ferris
dd737af03e Added Rails 3 integration 2010-06-09 11:42:48 -04:00