File: factory_bot.rb

package info (click to toggle)
ruby-test-prof 0.12.2%2Bdfsg-1
  • links: PTS, VCS
  • area: main
  • in suites: bookworm, bullseye, forky, sid, trixie
  • size: 508 kB
  • sloc: ruby: 4,075; makefile: 4
file content (11 lines) | stat: -rw-r--r-- 305 bytes parent folder | download
1
2
3
4
5
6
7
8
9
10
11
# frozen_string_literal: true

module TestProf # :nodoc: all
  FACTORY_GIRL_NAMES = {"factory_bot" => "::FactoryBot", "factory_girl" => "::FactoryGirl"}.freeze

  FACTORY_GIRL_NAMES.find do |name, cname|
    TestProf.require(name) do
      TestProf::FactoryBot = Object.const_get(cname)
    end
  end
end