Files
Brooke Kuhlmann 4db5febbb3 Refactored date/times to use Time
This simplfies the date/time logic so only `Time` is used since `DateTime` is more of a relic because it's less performant, doesn't handle daylight savings time, and isn't based on the Gregorian calendar (which is what is most used these days).

These changes allow us to reach 95% line coverage as a minimum. The reason branch converage isn't there is because of all of the fallback logic which still needs to be addressed.

Milestone: patch
2026-02-04 14:39:36 -07:00

48 lines
1.2 KiB
Ruby

# frozen_string_literal: true
require "simplecov"
unless ENV["COVERAGE"] == "no"
SimpleCov.start do
add_filter %r(^/spec/)
enable_coverage :branch
enable_coverage_for_eval
minimum_coverage_by_file line: 95, branch: 69
end
end
Bundler.require :tools
require "refinements"
require "trmnl/liquid"
SPEC_ROOT = Pathname(__dir__).realpath.freeze
using Refinements::Pathname
RSpec.configure do |config|
config.color = true
config.disable_monkey_patching!
config.example_status_persistence_file_path = "./tmp/rspec-examples.txt"
config.filter_run_when_matching :focus
config.formatter = ENV.fetch("CI", false) == "true" ? :progress : :documentation
config.order = :random
config.pending_failure_output = :no_backtrace
config.shared_context_metadata_behavior = :apply_to_host_groups
config.warnings = true
config.expect_with :rspec do |expectations|
expectations.syntax = :expect
expectations.include_chain_clauses_in_custom_matcher_descriptions = true
end
config.mock_with :rspec do |mocks|
mocks.verify_doubled_constant_names = true
mocks.verify_partial_doubles = true
end
config.before(:suite) { TRMNL::Liquid.load :rails }
Kernel.srand config.seed
end