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

28 commits

Author SHA1 Message Date
Kevin Reintjes
5b17b5777b Add filename_proc option to Factory generator 2015-03-16 09:02:12 -04:00
Joshua Clayton
3ac64d789f Factories are added after the define block
Fixes #150
2015-03-14 21:59:59 -04:00
Rodolfo Spalenza
c761d47c93 Fix when use fixture_replacement with suffix option.
Fix #113
2015-03-14 20:53:35 -04:00
Peter Marsh
3a050736f3 Change FactoryGirl::Generators::Base#explicit_class_option to output 1.9 Hashes 2015-03-14 20:30:51 -04:00
Takeo Fujita
3488c767c7 fix indent of generated factory file 2015-03-13 21:32:48 -04:00
Jessie A. Young
da421ce31d Do not generate new file if factories.rb exists
* Instead, insert factory into `factories.rb`
* Reference: https://github.com/thoughtbot/suspenders/pull/339
* Add info on change to README
2014-08-07 13:15:52 -07:00
Trevor John
d5a435dab0 allow dir to be optional param for generator
[Fixes #131]
2014-06-28 14:15:19 -04:00
Joshua Clayton
b44b6b106b Support Spring out of the box
Closes #120
2014-02-12 11:20:36 -05:00
Joshua Clayton
90e02a3a3c Break generator up for separate frameworks
Closes #91, Closes #62
2013-04-05 11:13:35 -04:00
Joshua Clayton
079657625d Require factory_girl_rails explicitly in generator
This resolves an issue where factory_girl_rails won't get required if
you only have factory_girl_rails declared in the :test group of a Rails
app.

Closes #89
2013-02-08 12:03:14 -05:00
Joshua Clayton
cb211119e0 Remove debugging 2013-02-08 09:23:17 -05: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
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
Joshua Clayton
a6ccbcb9f6 Support yardoc
This commit renames the .rb template to .erb. With it renamed, yardoc
won't try and parse the file (which was causing the install to break).

Closes #52
2012-03-30 10:27:41 -04:00
Joshua Flanagan
7df9c9b13a Respect model namespaces when generating factories.
The factory name for the model Namespaced::User wil be :namespaced_user.
The :class option is specified as a string to prevent class reloading issues.

Addresses GH-44
2012-02-26 12:58:48 -06:00
Carlos Antonio da Silva
42f5a10554 Update github url in generator template to use https 2012-01-26 22:34:20 -02:00
Artem Ignatyev
191ce5e47e Tweaked factory_girls_initialization process to allow other engines to advertise its factories for use in a recipient project
When a (mountable) engine defines models and factories to test the models, sometimes it is convenient to use this factories
from a project which depends on the engine.

But current factory_girl_rail initialization processes do not allow to do so without hacks.
(after_initializer resets all FactoryGirl.definition_file_paths to defaults with = [paths])

When this change introduces the engine can advertise some factories in an its own railtie, i.e.:

module ModelCore
  class Engine < Rails::Engine

    initializer "model_core.factories", :after => "factory_girl.set_factory_paths" do
      FactoryGirl.definition_file_paths << File.expand_path('../../../spec/factories', __FILE__) if defined?(FactoryGirl)
    end
  end
end
2011-12-02 11:23:51 -06:00
Gabe Berke-Williams
1e47af0319 Remove broken, unused version file. 2011-11-29 23:57:02 -05:00
Gabe Berke-Williams
eb7d9c1126 Use Bundler gem conventions. 2011-11-12 09:43:52 -05:00
Mike Burns
987a488e95 Merge branch 'add_fixture_replacement' of https://github.com/msgehard/factory_girl_rails 2011-10-14 11:28:10 -04:00
Jeff Dutil
d364e832d6 Correct whitespace generated by factory template.
Closes #36
2011-10-14 10:36:05 -04: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
Chris Griego
a38b0dd62d Load factories from /factories at the Rails root, just like the default definition_file_paths. 2011-08-27 16:41:27 -05:00
Mike Gehard
9f26cabfdf Move generators from rails3-generators gem over to factory_girl_rails. 2011-07-11 21:11:06 -06:00
Balint Erdi
6e523f0ed7 Follows changes introduced in factory_girl (Factory class -> FactoryGirl module) 2010-08-25 22:54:55 +08:00
Joe Ferris
dd737af03e Added Rails 3 integration 2010-06-09 11:42:48 -04:00