Skip to content

Commit

Permalink
rspec: Check that all jsons can be loaded into struct
Browse files Browse the repository at this point in the history
Signed-off-by: Kostiantyn Kostiuk <[email protected]>
  • Loading branch information
kostyanf14 committed Mar 4, 2024
1 parent 2f721a6 commit da0f944
Showing 1 changed file with 21 additions and 0 deletions.
21 changes: 21 additions & 0 deletions spec/srb_json_load_spec.rb
Original file line number Diff line number Diff line change
@@ -0,0 +1,21 @@
require 'json'

require './lib/models/driver'

describe 'srb_json_load' do
Dir['./**/*.json'].each do |json_file|
next if json_file.include? 'jtd.json'

it json_file.to_s do
data = nil
if json_file.include? 'lib/engines/hcktest/drivers'
data = AutoHCK::Models::Driver.from_json_file(json_file)
else
pending("NO TYPE FOR #{json_file}")
raise
end

expect(data).not_to be_nil
end
end
end

0 comments on commit da0f944

Please sign in to comment.