* Install Rspec * Create .aidigestignore * Update rails_helper - Added sections and comments - Add support for loading via canonical.rb - Add FactoryBot syntax methods - Disable SQL logging in test environment * Move gems around * Add canonical.rb and test env CSVs We load these CSVs via canonical.rb when we run tests as a data source for canonical objects. * Remove RBS for now This is too much and we need to find the right solution * Refactor GridSummonsController and add tests * Create GridSummon factory * Refactor GridSummon and add documentation and tests * Create have_error_on.rb * Update .aidigestignore * Fix warnings * Add GridWeapons and Parties factories * Refactor GridWeapon and add documentation and tests * Create .rubocop.yml * Create no_weapon_provided_error.rb * Refactor GridWeaponsController - Refactors controller - Adds YARD documentation - Adds Rspec tests * Refactor GridSummonsController - Refactors controller - Adds YARD documentation - Adds Rspec tests * Enable shoulda/matchers * Update User factory * Update party.rb We moved updating the party's element and extra flag to inside the party. We use an after_commit hook to minimize the amount of queries we're running to do this. * Update party.rb We change setting the edit key to use the conditional assignment operator so that it doesn't get overridden when we're running tests. This shouldn't have an effect in production. * Update api_controller.rb Change render_unprocessable_entity_response to render the errors hash instead of the exception so that we get more helpful errors. * Add new errors Added NoCharacterProvidedError and NoSummonProvidedError * Add tests and docs to GridCharacter We added a factory, spec and documentation to the GridCharacter model * Ensure numericality * Move enums into GranblueEnums We don't use these yet, but it gives us a structured place to pull them from. * Refactor GridCharactersController - Refactors controller - Adds YARD documentation - Adds Rspec tests * Add debug hook and other small changes * Update grid_characters_controller.rb Removes logs * Update .gitignore * Update .aidigestignore * Refactored PartiesController - Split PartiesController into three concerns - Implemented testing for PartiesController and two concerns - Implemented fixes across other files to ensure PartiesController tests pass - Added Favorites factory * Implement SimpleCov * Refactor Party model - Refactors Party model - Adds tests - Adds documentation * Update granblue_enums.rb Remove included block
53 lines
2.1 KiB
Ruby
53 lines
2.1 KiB
Ruby
require 'active_support/core_ext/integer/time'
|
|
|
|
# The test environment is used exclusively to run your application's
|
|
# test suite. You never need to work with it otherwise. Remember that
|
|
# your test database is "scratch space" for the test suite and is wiped
|
|
# and recreated between test runs. Don't rely on the data there!
|
|
|
|
Rails.application.configure do
|
|
# Settings specified here will take precedence over those in config/application.rb.
|
|
|
|
# Turn false under Spring and add config.action_view.cache_template_loading = true.
|
|
config.cache_classes = false
|
|
|
|
# Eager loading loads your whole application. When running a single test locally,
|
|
# this probably isn't necessary. It's a good idea to do in a continuous integration
|
|
# system, or in some way before deploying your code.
|
|
config.eager_load = ENV['CI'].present?
|
|
|
|
# Configure public file server for tests with Cache-Control for performance.
|
|
config.public_file_server.enabled = true
|
|
config.public_file_server.headers = {
|
|
'Cache-Control' => "public, max-age=#{1.hour.to_i}"
|
|
}
|
|
|
|
# Show full error reports and disable caching.
|
|
config.consider_all_requests_local = true
|
|
config.action_controller.perform_caching = false
|
|
config.cache_store = :null_store
|
|
|
|
# Raise exceptions instead of rendering exception templates.
|
|
config.action_dispatch.show_exceptions = false
|
|
|
|
# Disable request forgery protection in test environment.
|
|
config.action_controller.allow_forgery_protection = false
|
|
|
|
# Store uploaded files on the local file system in a temporary directory.
|
|
config.active_storage.service = :test
|
|
|
|
# Print deprecation notices to the stderr.
|
|
config.active_support.deprecation = :stderr
|
|
|
|
# Raise exceptions for disallowed deprecations.
|
|
config.active_support.disallowed_deprecation = :raise
|
|
|
|
# Tell Active Support which deprecation messages to disallow.
|
|
config.active_support.disallowed_deprecation_warnings = []
|
|
|
|
# Raises error for missing translations.
|
|
# config.i18n.raise_on_missing_translations = true
|
|
|
|
# Annotate rendered view with file names.
|
|
# config.action_view.annotate_rendered_view_with_filenames = true
|
|
end
|