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 5, 2024
1 parent f9c1c4c commit 695ef94
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 695ef94

Please sign in to comment.