Module: Refinery::Testing
- Defined in:
- lib/refinery/testing.rb,
lib/refinery/testing/railtie.rb,
lib/refinery/testing/feature_macros.rb,
lib/refinery/testing/controller_macros.rb,
lib/refinery/testing/controller_macros/routes.rb,
lib/refinery/testing/feature_macros/authentication.rb,
lib/refinery/testing/controller_macros/authentication.rb
Defined Under Namespace
Modules: ControllerMacros, FeatureMacros Classes: Railtie
Class Method Summary collapse
-
.load_factories ⇒ Object
Load the factories of all currently loaded extensions.
- .root ⇒ Object
Class Method Details
.load_factories ⇒ Object
Load the factories of all currently loaded extensions
16 17 18 19 20 21 22 23 24 25 |
# File 'lib/refinery/testing.rb', line 16 def load_factories Refinery.extensions.each do |extension_const| if extension_const.respond_to?(:factory_paths) extension_const.send(:factory_paths).each do |path| FactoryBot.definition_file_paths << path end end end FactoryBot.find_definitions end |
.root ⇒ Object
11 12 13 |
# File 'lib/refinery/testing.rb', line 11 def root @root ||= Pathname.new(File.('../../../', __FILE__)) end |