activerecord_json_validator icon indicating copy to clipboard operation
activerecord_json_validator copied to clipboard

🎨 Modernize test harness

Open pboling opened this issue 2 years ago • 2 comments

The test suite continues to not work at all, due to:

  1) JsonValidator validate_each with valid JSON data but schema errors 
     Failure/Error:
       create_table(:users, force: true) do |t|
         t.text :data
         t.json :smart_data
       end
     
     NoMethodError:
       undefined method `level' for false:FalseClass
     # ./spec/json_validator_spec.rb:22:in `block (4 levels) in <top (required)>'
     # ./spec/support/macros/database_macros.rb:16:in `instance_exec'
     # ./spec/support/macros/database_macros.rb:16:in `block in run_migration'
     # ./spec/support/macros/database_macros.rb:19:in `run_migration'
     # ./spec/json_validator_spec.rb:21:in `block (3 levels) in <top (required)>'

It is the same error with both MySQL and PostgreSQL drivers.

But this is a big step in the direction of getting it working again.

I'm hoping this is step one on a path to getting the gem working with json_schemer v2!

pboling avatar Oct 25 '23 01:10 pboling

Hi Peter!

Could you fix the Rubocop errors so that the workflow can fail when running the test suite? 😬 Sorry about that!

remi avatar Oct 27 '23 01:10 remi

@remi Done!

pboling avatar Oct 27 '23 02:10 pboling