M Gemfile => Gemfile +4 -0
@@ 177,10 177,14 @@ group :development do
# Validate missing i18n keys
gem 'i18n-tasks', '~> 1.0', require: false
+end
+group :development, :test do
# Profiling tools
gem 'memory_profiler', require: false
+ gem 'ruby-prof', require: false
gem 'stackprof', require: false
+ gem 'test-prof'
end
group :production do
M Gemfile.lock => Gemfile.lock +4 -0
@@ 644,6 644,7 @@ GEM
rubocop (~> 1.33)
rubocop-capybara (~> 2.17)
rubocop-factory_bot (~> 2.22)
+ ruby-prof (1.6.3)
ruby-progressbar (1.13.0)
ruby-saml (1.15.0)
nokogiri (>= 1.13.10)
@@ 718,6 719,7 @@ GEM
unicode-display_width (>= 1.1.1, < 3)
terrapin (0.6.0)
climate_control (>= 0.0.3, < 1.0)
+ test-prof (1.2.1)
thor (1.2.2)
tilt (2.2.0)
timeout (0.4.0)
@@ 891,6 893,7 @@ DEPENDENCIES
rubocop-performance
rubocop-rails
rubocop-rspec
+ ruby-prof
ruby-progressbar (~> 1.13)
rubyzip (~> 2.3)
sanitize (~> 6.0)
@@ 908,6 911,7 @@ DEPENDENCIES
stackprof
stoplight (~> 3.0.1)
strong_migrations (~> 0.8)
+ test-prof
thor (~> 1.2)
tty-prompt (~> 0.23)
twitter-text (~> 3.1.0)
R spec/fabricators_spec.rb => spec/fabricators/fabricators_spec.rb +0 -0
M spec/rails_helper.rb => spec/rails_helper.rb +8 -0
@@ 147,6 147,14 @@ RSpec.configure do |config|
Rails.cache.clear
redis.del(redis.keys)
end
+
+ # Assign types based on dir name for non-inferred types
+ config.define_derived_metadata(file_path: %r{/spec/}) do |metadata|
+ unless metadata.key?(:type)
+ match = metadata[:location].match(%r{/spec/([^/]+)/})
+ metadata[:type] = match[1].singularize.to_sym
+ end
+ end
end
RSpec::Sidekiq.configure do |config|