Class: Embryo::FactoryGirl
- Inherits:
-
Object
- Object
- Embryo::FactoryGirl
- Defined in:
- lib/embryo/factory_girl.rb
Instance Method Summary collapse
- #factory_girl_helper_data ⇒ Object
-
#initialize(filesystem) ⇒ FactoryGirl
constructor
A new instance of FactoryGirl.
- #install ⇒ Object
Constructor Details
#initialize(filesystem) ⇒ FactoryGirl
3 4 5 |
# File 'lib/embryo/factory_girl.rb', line 3 def initialize(filesystem) @filesystem = filesystem end |
Instance Method Details
#factory_girl_helper_data ⇒ Object
12 13 14 15 16 17 |
# File 'lib/embryo/factory_girl.rb', line 12 def factory_girl_helper_data 'RSpec.configure do |config| config.include FactoryGirl::Syntax::Methods end ' end |
#install ⇒ Object
7 8 9 10 |
# File 'lib/embryo/factory_girl.rb', line 7 def install @filesystem.require_gem "factory_girl_rails", "~> 4.0", group: :test @filesystem.write "spec/support/factory_girl.rb", factory_girl_helper_data end |