Add factory bot dependency
This commit is contained in:
parent
986fc47c73
commit
9582315e59
2
Gemfile
2
Gemfile
@ -10,3 +10,5 @@ gem "rake", "~> 13.0"
|
|||||||
gem "rspec", "~> 3.0"
|
gem "rspec", "~> 3.0"
|
||||||
|
|
||||||
gem "standard", "~> 1.3"
|
gem "standard", "~> 1.3"
|
||||||
|
|
||||||
|
gem "factory_bot", "~> 6.3"
|
||||||
|
25
Gemfile.lock
25
Gemfile.lock
@ -7,12 +7,33 @@ PATH
|
|||||||
GEM
|
GEM
|
||||||
remote: https://rubygems.org/
|
remote: https://rubygems.org/
|
||||||
specs:
|
specs:
|
||||||
|
activesupport (7.1.1)
|
||||||
|
base64
|
||||||
|
bigdecimal
|
||||||
|
concurrent-ruby (~> 1.0, >= 1.0.2)
|
||||||
|
connection_pool (>= 2.2.5)
|
||||||
|
drb
|
||||||
|
i18n (>= 1.6, < 2)
|
||||||
|
minitest (>= 5.1)
|
||||||
|
mutex_m
|
||||||
|
tzinfo (~> 2.0)
|
||||||
ast (2.4.2)
|
ast (2.4.2)
|
||||||
base64 (0.1.1)
|
base64 (0.1.1)
|
||||||
|
bigdecimal (3.1.4)
|
||||||
|
concurrent-ruby (1.2.2)
|
||||||
|
connection_pool (2.4.1)
|
||||||
diff-lcs (1.5.0)
|
diff-lcs (1.5.0)
|
||||||
|
drb (2.1.1)
|
||||||
|
ruby2_keywords
|
||||||
|
factory_bot (6.3.0)
|
||||||
|
activesupport (>= 5.0.0)
|
||||||
|
i18n (1.14.1)
|
||||||
|
concurrent-ruby (~> 1.0)
|
||||||
json (2.6.3)
|
json (2.6.3)
|
||||||
language_server-protocol (3.17.0.3)
|
language_server-protocol (3.17.0.3)
|
||||||
lint_roller (1.1.0)
|
lint_roller (1.1.0)
|
||||||
|
minitest (5.20.0)
|
||||||
|
mutex_m (0.1.2)
|
||||||
parallel (1.23.0)
|
parallel (1.23.0)
|
||||||
parser (3.2.2.4)
|
parser (3.2.2.4)
|
||||||
ast (~> 2.4.1)
|
ast (~> 2.4.1)
|
||||||
@ -54,6 +75,7 @@ GEM
|
|||||||
rubocop (>= 1.7.0, < 2.0)
|
rubocop (>= 1.7.0, < 2.0)
|
||||||
rubocop-ast (>= 0.4.0)
|
rubocop-ast (>= 0.4.0)
|
||||||
ruby-progressbar (1.13.0)
|
ruby-progressbar (1.13.0)
|
||||||
|
ruby2_keywords (0.0.5)
|
||||||
standard (1.31.2)
|
standard (1.31.2)
|
||||||
language_server-protocol (~> 3.17.0.2)
|
language_server-protocol (~> 3.17.0.2)
|
||||||
lint_roller (~> 1.0)
|
lint_roller (~> 1.0)
|
||||||
@ -66,12 +88,15 @@ GEM
|
|||||||
standard-performance (1.2.1)
|
standard-performance (1.2.1)
|
||||||
lint_roller (~> 1.1)
|
lint_roller (~> 1.1)
|
||||||
rubocop-performance (~> 1.19.1)
|
rubocop-performance (~> 1.19.1)
|
||||||
|
tzinfo (2.0.6)
|
||||||
|
concurrent-ruby (~> 1.0)
|
||||||
unicode-display_width (2.5.0)
|
unicode-display_width (2.5.0)
|
||||||
|
|
||||||
PLATFORMS
|
PLATFORMS
|
||||||
arm64-darwin-22
|
arm64-darwin-22
|
||||||
|
|
||||||
DEPENDENCIES
|
DEPENDENCIES
|
||||||
|
factory_bot (~> 6.3)
|
||||||
rake (~> 13.0)
|
rake (~> 13.0)
|
||||||
rex!
|
rex!
|
||||||
rspec (~> 3.0)
|
rspec (~> 3.0)
|
||||||
|
@ -1,6 +1,13 @@
|
|||||||
# frozen_string_literal: true
|
# frozen_string_literal: true
|
||||||
|
|
||||||
require "rex"
|
require "rex"
|
||||||
|
require 'factory_bot'
|
||||||
|
Dir[
|
||||||
|
File.join(
|
||||||
|
File.expand_path("../support", __FILE__),
|
||||||
|
"**",
|
||||||
|
"*.rb"
|
||||||
|
)].sort.each { |f| require f }
|
||||||
|
|
||||||
RSpec.configure do |config|
|
RSpec.configure do |config|
|
||||||
# Enable flags like --only-failures and --next-failure
|
# Enable flags like --only-failures and --next-failure
|
||||||
|
11
spec/support/factory_bot.rb
Normal file
11
spec/support/factory_bot.rb
Normal file
@ -0,0 +1,11 @@
|
|||||||
|
# frozen_string_literal: true
|
||||||
|
|
||||||
|
require "factory_bot"
|
||||||
|
|
||||||
|
RSpec.configure do |config|
|
||||||
|
config.include FactoryBot::Syntax::Methods
|
||||||
|
|
||||||
|
config.before(:suite) do
|
||||||
|
FactoryBot.find_definitions
|
||||||
|
end
|
||||||
|
end
|
Loading…
Reference in New Issue
Block a user