Commit Graph

7 Commits

Author SHA1 Message Date
Daniel Colson bf04aaa068 Autocorrect all static attributes to dynamic
Most of this was fixed by adding the `attribute-defined-statically-cop`
branch of `thoughtbot/rubocop-rspec` to the Gemfile and running:

```sh
  rubocop \
    --require rubocop-rspec \
    --only FactoryBot/AttributeDefinedStatically \
    --auto-correct
```

I had to update the cucumber tests manually, and I realized our changes
don't handle `ignore` blocks or blocks with arity 1 that use the yielded
DefinitionProxy. I will update
https://github.com/rubocop-hq/rubocop-rspec/pull/666to handle these
cases.
2018-09-14 19:27:13 +00:00
Avielle c716ce01b4 Replace 'girl' with 'bot' everywhere (#1051)
Also: add a deprecation warning to factory_girl, asking users to switch to
factory_bot

https://github.com/thoughtbot/factory_girl/issues/921
2017-10-20 15:20:28 -04:00
Prem Sichanugrist 40fc48d488 Fix FactoryGirl naming convention
So now, we'll always refer to this Gem as FactoryGirl, regardless of
context. This commit is to make it consistence throughout the code base.
2012-07-14 09:22:36 -04:00
Joshua Clayton 3798144bd1 FactoryGirl.reload clears all registries and loads all known definitions
Closes #196
2011-09-02 14:45:27 -04:00
Joshua Clayton a4e75163c8 Load definition files instead of require so re-running find_definitions works as expected
Closes #161
2011-07-29 14:00:08 -04:00
Joshua Clayton 17f3ef408d Fix find_definitions to expand the path instead of always prepending . 2011-07-22 14:47:47 -04:00
Joshua Clayton c47affb1aa Requiring factory definition files now works in 1.9 outside of tests
Ruby 1.9 doesn't automatically include . in the load path; if we do a
require to a relative path (eg a file within spec or test), 1.9 will raise a
LoadError because spec or test isn't normally in the load path.
2011-07-22 11:53:21 -04:00