Handle ActiveRecord::DatabaseConnectionError #7
Rspec Tests - Rails 5.2 - postgresql ❌
❌ test_results/rspec.xml
119 tests were completed in 3s with 100 passed, 19 failed and 0 skipped.
Test suite | Passed | Failed | Skipped | Time |
---|---|---|---|---|
rspec | 100✅ | 19❌ | 3s |
❌ rspec
spec.unit.persistent_enum_spec
✅ PersistentEnum refuses to create a table in a transaction
✅ PersistentEnum with an enum model returns all values from the database
✅ PersistentEnum with an enum model is immutable
✅ PersistentEnum with an enum model behaves like acts like a persisted enum looks up each value
✅ PersistentEnum with an enum model behaves like acts like a persisted enum returns all values from the cache
✅ PersistentEnum with an enum model behaves like acts like a persisted enum a referring model can be created from enum value
✅ PersistentEnum with an enum model behaves like acts like a persisted enum a referring model can be created from constant name
✅ PersistentEnum with an enum model behaves like acts like a persisted enum a referring model can be created from ordinal
✅ PersistentEnum with an enum model behaves like acts like a persisted enum a referring model can be created with null foreign key
✅ PersistentEnum with an enum model behaves like acts like a persisted enum a referring model can not be created with invalid foreign key
✅ PersistentEnum with an enum model behaves like acts like a persisted enum a referring model can not be created with invalid foreign constant
✅ PersistentEnum with a validation on the model does not admit invalid values
✅ PersistentEnum with a validation on the model with existing invalid values does not admit invalid values
❌ PersistentEnum with a table-less enum behaves like falls back to a dummy model without rake defined raises the error directly
Failure/Error: expect { model }.to raise_error(PersistentEnum::EnumTableInvalid)
❌ PersistentEnum with a table-less enum behaves like falls back to a dummy model with rake defined warns that it is falling back
Failure/Error: rescue ActiveRecord::NoDatabaseError, ActiveRecord::DatabaseConnectionError
❌ PersistentEnum with a table-less enum behaves like falls back to a dummy model with rake defined makes a dummy model
Failure/Error: rescue ActiveRecord::NoDatabaseError, ActiveRecord::DatabaseConnectionError
❌ PersistentEnum with a table-less enum behaves like falls back to a dummy model with rake defined initializes dummy values correctly
Failure/Error: rescue ActiveRecord::NoDatabaseError, ActiveRecord::DatabaseConnectionError
❌ PersistentEnum with a table-less enum with rake defined behaves like acts like an enum looks up each value
Failure/Error: rescue ActiveRecord::NoDatabaseError, ActiveRecord::DatabaseConnectionError
❌ PersistentEnum with a table-less enum with rake defined behaves like acts like an enum returns all values from the cache
Failure/Error: rescue ActiveRecord::NoDatabaseError, ActiveRecord::DatabaseConnectionError
✅ PersistentEnum with existing data caches required values
✅ PersistentEnum with existing data caches all values
✅ PersistentEnum with existing data loads all values
✅ PersistentEnum with existing data caches required ordinals
✅ PersistentEnum with existing data caches all ordinals
✅ PersistentEnum with existing data loads all ordinals
✅ PersistentEnum with existing data respects initial value
✅ PersistentEnum with existing data respects existing value
✅ PersistentEnum with existing data marks existing model as non-active
✅ PersistentEnum with existing data behaves like acts like a persisted enum looks up each value
✅ PersistentEnum with existing data behaves like acts like a persisted enum returns all values from the cache
✅ PersistentEnum with existing data behaves like acts like a persisted enum a referring model can be created from enum value
✅ PersistentEnum with existing data behaves like acts like a persisted enum a referring model can be created from constant name
✅ PersistentEnum with existing data behaves like acts like a persisted enum a referring model can be created from ordinal
✅ PersistentEnum with existing data behaves like acts like a persisted enum a referring model can be created with null foreign key
✅ PersistentEnum with existing data behaves like acts like a persisted enum a referring model can not be created with invalid foreign key
✅ PersistentEnum with existing data behaves like acts like a persisted enum a referring model can not be created with invalid foreign constant
✅ PersistentEnum with cached constants caches all the constants
✅ PersistentEnum with complex constant names caches the constant name as we expect
✅ PersistentEnum with extra fields warns if nonexistent attributes are provided
✅ PersistentEnum with extra fields providing a hash keeps outdated data
✅ PersistentEnum with extra fields providing a hash behaves like acts like a persisted enum looks up each value
✅ PersistentEnum with extra fields providing a hash behaves like acts like a persisted enum returns all values from the cache
✅ PersistentEnum with extra fields providing a hash behaves like acts like a persisted enum a referring model can be created from enum value
✅ PersistentEnum with extra fields providing a hash behaves like acts like a persisted enum a referring model can be created from constant name
✅ PersistentEnum with extra fields providing a hash behaves like acts like a persisted enum a referring model can be created from ordinal
✅ PersistentEnum with extra fields providing a hash behaves like acts like a persisted enum a referring model can be created with null foreign key
✅ PersistentEnum with extra fields providing a hash behaves like acts like a persisted enum a referring model can not be created with invalid foreign key
✅ PersistentEnum with extra fields providing a hash behaves like acts like a persisted enum a referring model can not be created with invalid foreign constant
✅ PersistentEnum with extra fields providing a hash behaves like acts like a persisted enum with extra fields has all expected members with expected values
✅ PersistentEnum with extra fields providing a hash when reinitializing uses the same constant
✅ PersistentEnum with extra fields providing a hash when reinitializing handles a change in an attribute
✅ PersistentEnum with extra fields providing a hash when reinitializing handles a change in enum constant by replacing
✅ PersistentEnum with extra fields using builder interface behaves like acts like a persisted enum looks up each value
✅ PersistentEnum with extra fields using builder interface behaves like acts like a persisted enum returns all values from the cache
✅ PersistentEnum with extra fields using builder interface behaves like acts like a persisted enum a referring model can be created from enum value
✅ PersistentEnum with extra fields using builder interface behaves like acts like a persisted enum a referring model can be created from constant name
✅ PersistentEnum with extra fields using builder interface behaves like acts like a persisted enum a referring model can be created from ordinal
✅ PersistentEnum with extra fields using builder interface behaves like acts like a persisted enum a referring model can be created with null foreign key
✅ PersistentEnum with extra fields using builder interface behaves like acts like a persisted enum a referring model can not be created with invalid foreign key
✅ PersistentEnum with extra fields using builder interface behaves like acts like a persisted enum a referring model can not be created with invalid foreign constant
✅ PersistentEnum with extra fields using builder interface behaves like acts like a persisted enum with extra fields has all expected members with expected values
✅ PersistentEnum with extra fields with closed over builder can reinitialize with a changed value
❌ PersistentEnum with extra fields without table behaves like falls back to a dummy model without rake defined raises the error directly
Failure/Error: expect { model }.to raise_error(PersistentEnum::EnumTableInvalid)
❌ PersistentEnum with extra fields without table behaves like falls back to a dummy model with rake defined warns that it is falling back
Failure/Error: rescue ActiveRecord::NoDatabaseError, ActiveRecord::DatabaseConnectionError
❌ PersistentEnum with extra fields without table behaves like falls back to a dummy model with rake defined makes a dummy model
Failure/Error: rescue ActiveRecord::NoDatabaseError, ActiveRecord::DatabaseConnectionError
❌ PersistentEnum with extra fields without table behaves like falls back to a dummy model with rake defined initializes dummy values correctly
Failure/Error: rescue ActiveRecord::NoDatabaseError, ActiveRecord::DatabaseConnectionError
❌ PersistentEnum with extra fields without table with rake defined behaves like acts like an enum looks up each value
Failure/Error: rescue ActiveRecord::NoDatabaseError, ActiveRecord::DatabaseConnectionError
❌ PersistentEnum with extra fields without table with rake defined behaves like acts like an enum returns all values from the cache
Failure/Error: rescue ActiveRecord::NoDatabaseError, ActiveRecord::DatabaseConnectionError
❌ PersistentEnum with extra fields without table with rake defined behaves like acts like an enum with extra fields has all expected members with expected values
Failure/Error: rescue ActiveRecord::NoDatabaseError, ActiveRecord::DatabaseConnectionError
✅ PersistentEnum with extra fields with missing required attributes behaves like falls back to a dummy model without rake defined raises the error directly
✅ PersistentEnum with extra fields with missing required attributes behaves like falls back to a dummy model with rake defined warns that it is falling back
✅ PersistentEnum with extra fields with missing required attributes behaves like falls back to a dummy model with rake defined makes a dummy model
✅ PersistentEnum with extra fields with missing required attributes behaves like falls back to a dummy model with rake defined initializes dummy values correctly
✅ PersistentEnum with extra fields with missing required attributes with rake defined warns that the required attributes were missing
✅ PersistentEnum with extra fields with attributes with defaults allows defaults to be omitted
✅ PersistentEnum with extra fields with attributes with defaults with non-default existing values asserts the defaults when omitted
✅ PersistentEnum with extra fields with array typed extra fields behaves like acts like a persisted enum looks up each value
✅ PersistentEnum with extra fields with array typed extra fields behaves like acts like a persisted enum returns all values from the cache
✅ PersistentEnum with extra fields with array typed extra fields behaves like acts like a persisted enum a referring model can be created from enum value
✅ PersistentEnum with extra fields with array typed extra fields behaves like acts like a persisted enum a referring model can be created from constant name
✅ PersistentEnum with extra fields with array typed extra fields behaves like acts like a persisted enum a referring model can be created from ordinal
✅ PersistentEnum with extra fields with array typed extra fields behaves like acts like a persisted enum a referring model can be created with null foreign key
✅ PersistentEnum with extra fields with array typed extra fields behaves like acts like a persisted enum a referring model can not be created with invalid foreign key
✅ PersistentEnum with extra fields with array typed extra fields behaves like acts like a persisted enum a referring model can not be created with invalid foreign constant
✅ PersistentEnum with extra fields with array typed extra fields behaves like acts like a persisted enum with extra fields has all expected members with expected values
✅ PersistentEnum using a postgresql enum valued id with table behaves like acts like a persisted enum looks up each value
✅ PersistentEnum using a postgresql enum valued id with table behaves like acts like a persisted enum returns all values from the cache
✅ PersistentEnum using a postgresql enum valued id with table behaves like acts like a persisted enum a referring model can be created from enum value
✅ PersistentEnum using a postgresql enum valued id with table behaves like acts like a persisted enum a referring model can be created from constant name
✅ PersistentEnum using a postgresql enum valued id with table behaves like acts like a persisted enum a referring model can be created from ordinal
✅ PersistentEnum using a postgresql enum valued id with table behaves like acts like a persisted enum a referring model can be created with null foreign key
✅ PersistentEnum using a postgresql enum valued id with table behaves like acts like a persisted enum a referring model can not be created with invalid foreign key
✅ PersistentEnum using a postgresql enum valued id with table behaves like acts like a persisted enum a referring model can not be created with invalid foreign constant
❌ PersistentEnum using a postgresql enum valued id without table behaves like falls back to a dummy model without rake defined raises the error directly
Failure/Error: expect { model }.to raise_error(PersistentEnum::EnumTableInvalid)
❌ PersistentEnum using a postgresql enum valued id without table behaves like falls back to a dummy model with rake defined warns that it is falling back
Failure/Error: rescue ActiveRecord::NoDatabaseError, ActiveRecord::DatabaseConnectionError
❌ PersistentEnum using a postgresql enum valued id without table behaves like falls back to a dummy model with rake defined makes a dummy model
Failure/Error: rescue ActiveRecord::NoDatabaseError, ActiveRecord::DatabaseConnectionError
❌ PersistentEnum using a postgresql enum valued id without table behaves like falls back to a dummy model with rake defined initializes dummy values correctly
Failure/Error: rescue ActiveRecord::NoDatabaseError, ActiveRecord::DatabaseConnectionError
❌ PersistentEnum using a postgresql enum valued id without table with rake defined behaves like acts like an enum looks up each value
Failure/Error: rescue ActiveRecord::NoDatabaseError, ActiveRecord::DatabaseConnectionError
❌ PersistentEnum using a postgresql enum valued id without table with rake defined behaves like acts like an enum returns all values from the cache
Failure/Error: rescue ActiveRecord::NoDatabaseError, ActiveRecord::DatabaseConnectionError
✅ PersistentEnum with the name of the enum value column changed behaves like acts like a persisted enum looks up each value
✅ PersistentEnum with the name of the enum value column changed behaves like acts like a persisted enum returns all values from the cache
✅ PersistentEnum with the name of the enum value column changed behaves like acts like a persisted enum a referring model can be created from enum value
✅ PersistentEnum with the name of the enum value column changed behaves like acts like a persisted enum a referring model can be created from constant name
✅ PersistentEnum with the name of the enum value column changed behaves like acts like a persisted enum a referring model can be created from ordinal
✅ PersistentEnum with the name of the enum value column changed behaves like acts like a persisted enum a referring model can be created with null foreign key
✅ PersistentEnum with the name of the enum value column changed behaves like acts like a persisted enum a referring model can not be created with invalid foreign key
✅ PersistentEnum with the name of the enum value column changed behaves like acts like a persisted enum a referring model can not be created with invalid foreign constant
✅ PersistentEnum without an index on the enum constant behaves like falls back to a dummy model without rake defined raises the error directly
✅ PersistentEnum without an index on the enum constant behaves like falls back to a dummy model with rake defined warns that it is falling back
✅ PersistentEnum without an index on the enum constant behaves like falls back to a dummy model with rake defined makes a dummy model
✅ PersistentEnum without an index on the enum constant behaves like falls back to a dummy model with rake defined initializes dummy values correctly
✅ PersistentEnum without an index on the enum constant with rake defined warns that the unique index was missing
✅ PersistentEnum without a unique index on the enum constant behaves like falls back to a dummy model without rake defined raises the error directly
✅ PersistentEnum without a unique index on the enum constant behaves like falls back to a dummy model with rake defined warns that it is falling back
✅ PersistentEnum without a unique index on the enum constant behaves like falls back to a dummy model with rake defined makes a dummy model
✅ PersistentEnum without a unique index on the enum constant behaves like falls back to a dummy model with rake defined initializes dummy values correctly
✅ PersistentEnum without a unique index on the enum constant with rake defined warns that the unique index was missing
✅ PersistentEnum with an empty constants array looks up the existing value
✅ PersistentEnum with an empty constants array caches the existing value
Annotations
Check failure on line 0 in test_results/rspec.xml
github-actions / Rspec Tests - Rails 5.2 - postgresql
rspec ► spec.unit.persistent_enum_spec ► PersistentEnum with a table-less enum behaves like falls back to a dummy model without rake defined raises the error directly
Failed test found in:
test_results/rspec.xml
Error:
Failure/Error: expect { model }.to raise_error(PersistentEnum::EnumTableInvalid)
Raw output
Failure/Error: expect { model }.to raise_error(PersistentEnum::EnumTableInvalid)
expected PersistentEnum::EnumTableInvalid, got #<NameError: uninitialized constant ActiveRecord::DatabaseConnectionError> with backtrace:
# ./lib/persistent_enum.rb:183:in `rescue in cache_constants_in_table'
# ./lib/persistent_enum.rb:179:in `cache_constants_in_table'
# ./lib/persistent_enum.rb:128:in `cache_constants'
# ./lib/persistent_enum/acts_as_enum.rb:67:in `initialize_acts_as_enum'
# ./lib/persistent_enum.rb:23:in `acts_as_enum'
# ./spec/unit/persistent_enum_spec.rb:232:in `block (4 levels) in <top (required)>'
# ./spec/support/helpers/database_helper.rb:49:in `class_eval'
# ./spec/support/helpers/database_helper.rb:49:in `create_test_model'
# ./spec/unit/persistent_enum_spec.rb:231:in `block (3 levels) in <top (required)>'
# ./spec/unit/persistent_enum_spec.rb:192:in `block (5 levels) in <top (required)>'
# ./spec/unit/persistent_enum_spec.rb:192:in `block (4 levels) in <top (required)>'
Shared Example Group: "falls back to a dummy model" called from ./spec/unit/persistent_enum_spec.rb:236
./spec/unit/persistent_enum_spec.rb:192:in `block (4 levels) in <top (required)>'
Check failure on line 0 in test_results/rspec.xml
github-actions / Rspec Tests - Rails 5.2 - postgresql
rspec ► spec.unit.persistent_enum_spec ► PersistentEnum with a table-less enum behaves like falls back to a dummy model with rake defined warns that it is falling back
Failed test found in:
test_results/rspec.xml
Error:
Failure/Error: rescue ActiveRecord::NoDatabaseError, ActiveRecord::DatabaseConnectionError
Raw output
Failure/Error: rescue ActiveRecord::NoDatabaseError, ActiveRecord::DatabaseConnectionError
NameError:
uninitialized constant ActiveRecord::DatabaseConnectionError
Shared Example Group: "falls back to a dummy model" called from ./spec/unit/persistent_enum_spec.rb:236
./lib/persistent_enum.rb:183:in `rescue in cache_constants_in_table'
./lib/persistent_enum.rb:179:in `cache_constants_in_table'
./lib/persistent_enum.rb:128:in `cache_constants'
./lib/persistent_enum/acts_as_enum.rb:67:in `initialize_acts_as_enum'
./lib/persistent_enum.rb:23:in `acts_as_enum'
./spec/unit/persistent_enum_spec.rb:232:in `block (4 levels) in <top (required)>'
./spec/support/helpers/database_helper.rb:49:in `class_eval'
./spec/support/helpers/database_helper.rb:49:in `create_test_model'
./spec/unit/persistent_enum_spec.rb:231:in `block (3 levels) in <top (required)>'
./spec/unit/persistent_enum_spec.rb:198:in `block (4 levels) in <top (required)>'
./spec/unit/persistent_enum_spec.rb:181:in `block (2 levels) in with_dummy_rake'
------------------
--- Caused by: ---
PersistentEnum::EnumTableInvalid:
Database table for model WithoutTable doesn't exist
./lib/persistent_enum.rb:181:in `cache_constants_in_table'
Check failure on line 0 in test_results/rspec.xml
github-actions / Rspec Tests - Rails 5.2 - postgresql
rspec ► spec.unit.persistent_enum_spec ► PersistentEnum with a table-less enum behaves like falls back to a dummy model with rake defined makes a dummy model
Failed test found in:
test_results/rspec.xml
Error:
Failure/Error: rescue ActiveRecord::NoDatabaseError, ActiveRecord::DatabaseConnectionError
Raw output
Failure/Error: rescue ActiveRecord::NoDatabaseError, ActiveRecord::DatabaseConnectionError
NameError:
uninitialized constant ActiveRecord::DatabaseConnectionError
Shared Example Group: "falls back to a dummy model" called from ./spec/unit/persistent_enum_spec.rb:236
./lib/persistent_enum.rb:183:in `rescue in cache_constants_in_table'
./lib/persistent_enum.rb:179:in `cache_constants_in_table'
./lib/persistent_enum.rb:128:in `cache_constants'
./lib/persistent_enum/acts_as_enum.rb:67:in `initialize_acts_as_enum'
./lib/persistent_enum.rb:23:in `acts_as_enum'
./spec/unit/persistent_enum_spec.rb:232:in `block (4 levels) in <top (required)>'
./spec/support/helpers/database_helper.rb:49:in `class_eval'
./spec/support/helpers/database_helper.rb:49:in `create_test_model'
./spec/unit/persistent_enum_spec.rb:231:in `block (3 levels) in <top (required)>'
./spec/unit/persistent_enum_spec.rb:205:in `block (4 levels) in <top (required)>'
./spec/unit/persistent_enum_spec.rb:181:in `block (2 levels) in with_dummy_rake'
------------------
--- Caused by: ---
PersistentEnum::EnumTableInvalid:
Database table for model WithoutTable doesn't exist
./lib/persistent_enum.rb:181:in `cache_constants_in_table'
Check failure on line 0 in test_results/rspec.xml
github-actions / Rspec Tests - Rails 5.2 - postgresql
rspec ► spec.unit.persistent_enum_spec ► PersistentEnum with a table-less enum behaves like falls back to a dummy model with rake defined initializes dummy values correctly
Failed test found in:
test_results/rspec.xml
Error:
Failure/Error: rescue ActiveRecord::NoDatabaseError, ActiveRecord::DatabaseConnectionError
Raw output
Failure/Error: rescue ActiveRecord::NoDatabaseError, ActiveRecord::DatabaseConnectionError
NameError:
uninitialized constant ActiveRecord::DatabaseConnectionError
Shared Example Group: "falls back to a dummy model" called from ./spec/unit/persistent_enum_spec.rb:236
./lib/persistent_enum.rb:183:in `rescue in cache_constants_in_table'
./lib/persistent_enum.rb:179:in `cache_constants_in_table'
./lib/persistent_enum.rb:128:in `cache_constants'
./lib/persistent_enum/acts_as_enum.rb:67:in `initialize_acts_as_enum'
./lib/persistent_enum.rb:23:in `acts_as_enum'
./spec/unit/persistent_enum_spec.rb:232:in `block (4 levels) in <top (required)>'
./spec/support/helpers/database_helper.rb:49:in `class_eval'
./spec/support/helpers/database_helper.rb:49:in `create_test_model'
./spec/unit/persistent_enum_spec.rb:231:in `block (3 levels) in <top (required)>'
./spec/unit/persistent_enum_spec.rb:211:in `block (4 levels) in <top (required)>'
./spec/unit/persistent_enum_spec.rb:181:in `block (2 levels) in with_dummy_rake'
------------------
--- Caused by: ---
PersistentEnum::EnumTableInvalid:
Database table for model WithoutTable doesn't exist
./lib/persistent_enum.rb:181:in `cache_constants_in_table'
Check failure on line 0 in test_results/rspec.xml
github-actions / Rspec Tests - Rails 5.2 - postgresql
rspec ► spec.unit.persistent_enum_spec ► PersistentEnum with a table-less enum with rake defined behaves like acts like an enum looks up each value
Failed test found in:
test_results/rspec.xml
Error:
Failure/Error: rescue ActiveRecord::NoDatabaseError, ActiveRecord::DatabaseConnectionError
Raw output
Failure/Error: rescue ActiveRecord::NoDatabaseError, ActiveRecord::DatabaseConnectionError
NameError:
uninitialized constant ActiveRecord::DatabaseConnectionError
Shared Example Group: "acts like an enum" called from ./spec/unit/persistent_enum_spec.rb:239
./lib/persistent_enum.rb:183:in `rescue in cache_constants_in_table'
./lib/persistent_enum.rb:179:in `cache_constants_in_table'
./lib/persistent_enum.rb:128:in `cache_constants'
./lib/persistent_enum/acts_as_enum.rb:67:in `initialize_acts_as_enum'
./lib/persistent_enum.rb:23:in `acts_as_enum'
./spec/unit/persistent_enum_spec.rb:232:in `block (4 levels) in <top (required)>'
./spec/support/helpers/database_helper.rb:49:in `class_eval'
./spec/support/helpers/database_helper.rb:49:in `create_test_model'
./spec/unit/persistent_enum_spec.rb:231:in `block (3 levels) in <top (required)>'
./spec/unit/persistent_enum_spec.rb:38:in `block (4 levels) in <top (required)>'
./spec/unit/persistent_enum_spec.rb:37:in `each'
./spec/unit/persistent_enum_spec.rb:37:in `block (3 levels) in <top (required)>'
./spec/unit/persistent_enum_spec.rb:181:in `block (2 levels) in with_dummy_rake'
------------------
--- Caused by: ---
PersistentEnum::EnumTableInvalid:
Database table for model WithoutTable doesn't exist
./lib/persistent_enum.rb:181:in `cache_constants_in_table'
Check failure on line 0 in test_results/rspec.xml
github-actions / Rspec Tests - Rails 5.2 - postgresql
rspec ► spec.unit.persistent_enum_spec ► PersistentEnum with a table-less enum with rake defined behaves like acts like an enum returns all values from the cache
Failed test found in:
test_results/rspec.xml
Error:
Failure/Error: rescue ActiveRecord::NoDatabaseError, ActiveRecord::DatabaseConnectionError
Raw output
Failure/Error: rescue ActiveRecord::NoDatabaseError, ActiveRecord::DatabaseConnectionError
NameError:
uninitialized constant ActiveRecord::DatabaseConnectionError
Shared Example Group: "acts like an enum" called from ./spec/unit/persistent_enum_spec.rb:239
./lib/persistent_enum.rb:183:in `rescue in cache_constants_in_table'
./lib/persistent_enum.rb:179:in `cache_constants_in_table'
./lib/persistent_enum.rb:128:in `cache_constants'
./lib/persistent_enum/acts_as_enum.rb:67:in `initialize_acts_as_enum'
./lib/persistent_enum.rb:23:in `acts_as_enum'
./spec/unit/persistent_enum_spec.rb:232:in `block (4 levels) in <top (required)>'
./spec/support/helpers/database_helper.rb:49:in `class_eval'
./spec/support/helpers/database_helper.rb:49:in `create_test_model'
./spec/unit/persistent_enum_spec.rb:231:in `block (3 levels) in <top (required)>'
./spec/unit/persistent_enum_spec.rb:50:in `block (3 levels) in <top (required)>'
./spec/unit/persistent_enum_spec.rb:181:in `block (2 levels) in with_dummy_rake'
------------------
--- Caused by: ---
PersistentEnum::EnumTableInvalid:
Database table for model WithoutTable doesn't exist
./lib/persistent_enum.rb:181:in `cache_constants_in_table'
Check failure on line 0 in test_results/rspec.xml
github-actions / Rspec Tests - Rails 5.2 - postgresql
rspec ► spec.unit.persistent_enum_spec ► PersistentEnum with extra fields without table behaves like falls back to a dummy model without rake defined raises the error directly
Failed test found in:
test_results/rspec.xml
Error:
Failure/Error: expect { model }.to raise_error(PersistentEnum::EnumTableInvalid)
Raw output
Failure/Error: expect { model }.to raise_error(PersistentEnum::EnumTableInvalid)
expected PersistentEnum::EnumTableInvalid, got #<NameError: uninitialized constant ActiveRecord::DatabaseConnectionError> with backtrace:
# ./lib/persistent_enum.rb:183:in `rescue in cache_constants_in_table'
# ./lib/persistent_enum.rb:179:in `cache_constants_in_table'
# ./lib/persistent_enum.rb:128:in `cache_constants'
# ./lib/persistent_enum/acts_as_enum.rb:67:in `initialize_acts_as_enum'
# ./lib/persistent_enum.rb:23:in `acts_as_enum'
# ./spec/unit/persistent_enum_spec.rb:509:in `block (5 levels) in <top (required)>'
# ./spec/support/helpers/database_helper.rb:49:in `class_eval'
# ./spec/support/helpers/database_helper.rb:49:in `create_test_model'
# ./spec/unit/persistent_enum_spec.rb:508:in `block (4 levels) in <top (required)>'
# ./spec/unit/persistent_enum_spec.rb:192:in `block (5 levels) in <top (required)>'
# ./spec/unit/persistent_enum_spec.rb:192:in `block (4 levels) in <top (required)>'
Shared Example Group: "falls back to a dummy model" called from ./spec/unit/persistent_enum_spec.rb:513
./spec/unit/persistent_enum_spec.rb:192:in `block (4 levels) in <top (required)>'
Check failure on line 0 in test_results/rspec.xml
github-actions / Rspec Tests - Rails 5.2 - postgresql
rspec ► spec.unit.persistent_enum_spec ► PersistentEnum with extra fields without table behaves like falls back to a dummy model with rake defined warns that it is falling back
Failed test found in:
test_results/rspec.xml
Error:
Failure/Error: rescue ActiveRecord::NoDatabaseError, ActiveRecord::DatabaseConnectionError
Raw output
Failure/Error: rescue ActiveRecord::NoDatabaseError, ActiveRecord::DatabaseConnectionError
NameError:
uninitialized constant ActiveRecord::DatabaseConnectionError
Shared Example Group: "falls back to a dummy model" called from ./spec/unit/persistent_enum_spec.rb:513
./lib/persistent_enum.rb:183:in `rescue in cache_constants_in_table'
./lib/persistent_enum.rb:179:in `cache_constants_in_table'
./lib/persistent_enum.rb:128:in `cache_constants'
./lib/persistent_enum/acts_as_enum.rb:67:in `initialize_acts_as_enum'
./lib/persistent_enum.rb:23:in `acts_as_enum'
./spec/unit/persistent_enum_spec.rb:509:in `block (5 levels) in <top (required)>'
./spec/support/helpers/database_helper.rb:49:in `class_eval'
./spec/support/helpers/database_helper.rb:49:in `create_test_model'
./spec/unit/persistent_enum_spec.rb:508:in `block (4 levels) in <top (required)>'
./spec/unit/persistent_enum_spec.rb:198:in `block (4 levels) in <top (required)>'
./spec/unit/persistent_enum_spec.rb:181:in `block (2 levels) in with_dummy_rake'
------------------
--- Caused by: ---
PersistentEnum::EnumTableInvalid:
Database table for model WithExtraFieldWithoutTable doesn't exist
./lib/persistent_enum.rb:181:in `cache_constants_in_table'
Check failure on line 0 in test_results/rspec.xml
github-actions / Rspec Tests - Rails 5.2 - postgresql
rspec ► spec.unit.persistent_enum_spec ► PersistentEnum with extra fields without table behaves like falls back to a dummy model with rake defined makes a dummy model
Failed test found in:
test_results/rspec.xml
Error:
Failure/Error: rescue ActiveRecord::NoDatabaseError, ActiveRecord::DatabaseConnectionError
Raw output
Failure/Error: rescue ActiveRecord::NoDatabaseError, ActiveRecord::DatabaseConnectionError
NameError:
uninitialized constant ActiveRecord::DatabaseConnectionError
Shared Example Group: "falls back to a dummy model" called from ./spec/unit/persistent_enum_spec.rb:513
./lib/persistent_enum.rb:183:in `rescue in cache_constants_in_table'
./lib/persistent_enum.rb:179:in `cache_constants_in_table'
./lib/persistent_enum.rb:128:in `cache_constants'
./lib/persistent_enum/acts_as_enum.rb:67:in `initialize_acts_as_enum'
./lib/persistent_enum.rb:23:in `acts_as_enum'
./spec/unit/persistent_enum_spec.rb:509:in `block (5 levels) in <top (required)>'
./spec/support/helpers/database_helper.rb:49:in `class_eval'
./spec/support/helpers/database_helper.rb:49:in `create_test_model'
./spec/unit/persistent_enum_spec.rb:508:in `block (4 levels) in <top (required)>'
./spec/unit/persistent_enum_spec.rb:205:in `block (4 levels) in <top (required)>'
./spec/unit/persistent_enum_spec.rb:181:in `block (2 levels) in with_dummy_rake'
------------------
--- Caused by: ---
PersistentEnum::EnumTableInvalid:
Database table for model WithExtraFieldWithoutTable doesn't exist
./lib/persistent_enum.rb:181:in `cache_constants_in_table'
Check failure on line 0 in test_results/rspec.xml
github-actions / Rspec Tests - Rails 5.2 - postgresql
rspec ► spec.unit.persistent_enum_spec ► PersistentEnum with extra fields without table behaves like falls back to a dummy model with rake defined initializes dummy values correctly
Failed test found in:
test_results/rspec.xml
Error:
Failure/Error: rescue ActiveRecord::NoDatabaseError, ActiveRecord::DatabaseConnectionError
Raw output
Failure/Error: rescue ActiveRecord::NoDatabaseError, ActiveRecord::DatabaseConnectionError
NameError:
uninitialized constant ActiveRecord::DatabaseConnectionError
Shared Example Group: "falls back to a dummy model" called from ./spec/unit/persistent_enum_spec.rb:513
./lib/persistent_enum.rb:183:in `rescue in cache_constants_in_table'
./lib/persistent_enum.rb:179:in `cache_constants_in_table'
./lib/persistent_enum.rb:128:in `cache_constants'
./lib/persistent_enum/acts_as_enum.rb:67:in `initialize_acts_as_enum'
./lib/persistent_enum.rb:23:in `acts_as_enum'
./spec/unit/persistent_enum_spec.rb:509:in `block (5 levels) in <top (required)>'
./spec/support/helpers/database_helper.rb:49:in `class_eval'
./spec/support/helpers/database_helper.rb:49:in `create_test_model'
./spec/unit/persistent_enum_spec.rb:508:in `block (4 levels) in <top (required)>'
./spec/unit/persistent_enum_spec.rb:211:in `block (4 levels) in <top (required)>'
./spec/unit/persistent_enum_spec.rb:181:in `block (2 levels) in with_dummy_rake'
------------------
--- Caused by: ---
PersistentEnum::EnumTableInvalid:
Database table for model WithExtraFieldWithoutTable doesn't exist
./lib/persistent_enum.rb:181:in `cache_constants_in_table'
Check failure on line 0 in test_results/rspec.xml
github-actions / Rspec Tests - Rails 5.2 - postgresql
rspec ► spec.unit.persistent_enum_spec ► PersistentEnum with extra fields without table with rake defined behaves like acts like an enum looks up each value
Failed test found in:
test_results/rspec.xml
Error:
Failure/Error: rescue ActiveRecord::NoDatabaseError, ActiveRecord::DatabaseConnectionError
Raw output
Failure/Error: rescue ActiveRecord::NoDatabaseError, ActiveRecord::DatabaseConnectionError
NameError:
uninitialized constant ActiveRecord::DatabaseConnectionError
Shared Example Group: "acts like an enum" called from ./spec/unit/persistent_enum_spec.rb:516
./lib/persistent_enum.rb:183:in `rescue in cache_constants_in_table'
./lib/persistent_enum.rb:179:in `cache_constants_in_table'
./lib/persistent_enum.rb:128:in `cache_constants'
./lib/persistent_enum/acts_as_enum.rb:67:in `initialize_acts_as_enum'
./lib/persistent_enum.rb:23:in `acts_as_enum'
./spec/unit/persistent_enum_spec.rb:509:in `block (5 levels) in <top (required)>'
./spec/support/helpers/database_helper.rb:49:in `class_eval'
./spec/support/helpers/database_helper.rb:49:in `create_test_model'
./spec/unit/persistent_enum_spec.rb:508:in `block (4 levels) in <top (required)>'
./spec/unit/persistent_enum_spec.rb:38:in `block (4 levels) in <top (required)>'
./spec/unit/persistent_enum_spec.rb:37:in `each'
./spec/unit/persistent_enum_spec.rb:37:in `block (3 levels) in <top (required)>'
./spec/unit/persistent_enum_spec.rb:181:in `block (2 levels) in with_dummy_rake'
------------------
--- Caused by: ---
PersistentEnum::EnumTableInvalid:
Database table for model WithExtraFieldWithoutTable doesn't exist
./lib/persistent_enum.rb:181:in `cache_constants_in_table'