File tree Expand file tree Collapse file tree 3 files changed +35
-0
lines changed
Expand file tree Collapse file tree 3 files changed +35
-0
lines changed Original file line number Diff line number Diff line change 1+ def reload!
2+ # Undefine FactoryBot so we can reload Constants and fresh code
3+ Object . send ( :remove_const , :FactoryBot ) if Object . const_defined? ( :FactoryBot )
4+
5+ # Remove all files from the 'loaded' register
6+ $LOADED_FEATURES. grep ( /factory_bot/ ) . each do |path |
7+ $LOADED_FEATURES. delete ( path )
8+ end
9+
10+ # re-load it again
11+ require "factory_bot"
12+ puts "\n factory_bot reloaded!\n \n "
13+ true
14+ end
Original file line number Diff line number Diff line change 1+ #!/usr/bin/env ruby
2+ # frozen_string_literal: true
3+
4+ lib = File . expand_path ( "../lib" , __dir__ )
5+ $LOAD_PATH. unshift ( lib ) unless $LOAD_PATH. include? ( lib )
6+
7+ require "bundler/setup"
8+ require "factory_bot"
9+
10+ # Add any other fixtures and/or initialization code here.
11+
12+ require "irb"
13+ require "irb/completion"
14+ IRB . start ( __FILE__ )
Original file line number Diff line number Diff line change 1+ #! /usr/bin/env bash
2+ set -euo pipefail
3+ IFS=$' \n\t '
4+ set -vx
5+
6+ bundle install
7+
You can’t perform that action at this time.
0 commit comments