<commit_before>require 'spec_helper'
require 'pact/consumer/request'
require 'pact/consumer_contract/request'
require 'pact/matchers/embedded_diff_formatter'


PACT_SPEC_DIR = "spec/support/pact-specification-v2/testcases"
REQUEST_TEST_CASE_FOLDERS = Dir.glob("#{PACT_SPEC_DIR}/request/**")
REQUEST_TEST_CASE_FILES = Dir.glob("#{PACT_SPEC_DIR}/request/**/*.json")

TEST_DESCRIPTIONS = {true => "matches", false => "does not match"}
TESTCASES = "**/*.json"
# TESTCASES = "array with nested array that matches.json"
describe "Pact gem complicance with Pact Specification 1.0.0" do

  directories = Dir.glob("#{PACT_SPEC_DIR}/request") # make this a *

  directories.each do | dir_name |

    describe File.basename(dir_name) do

      sub_directories = Dir.glob("#{dir_name}/*")

      sub_directories.each do | sub_dir_name |

        context File.basename(sub_dir_name) do
          testcases = Dir.glob("#{sub_dir_name}/#{TESTCASES}")<commit_msg>Update number of pact spec version in spec compliance test<commit_after>require 'spec_helper'
require 'pact/consumer/request'
require 'pact/consumer_contract/request'
require 'pact/matchers/embedded_diff_formatter'


PACT_SPEC_DIR = "spec/support/pact-specification-v2/testcases"
REQUEST_TEST_CASE_FOLDERS = Dir.glob("#{PACT_SPEC_DIR}/request/**")
REQUEST_TEST_CASE_FILES = Dir.glob("#{PACT_SPEC_DIR}/request/**/*.json")

TEST_DESCRIPTIONS = {true => "matches", false => "does not match"}
TESTCASES = "**/*.json"
# TESTCASES = "array with nested array that matches.json"
describe "Pact gem complicance with Pact Specification 2.0.0" do

  directories = Dir.glob("#{PACT_SPEC_DIR}/request") # make this a *

  directories.each do | dir_name |

    describe File.basename(dir_name) do

      sub_directories = Dir.glob("#{dir_name}/*")

      sub_directories.each do | sub_dir_name |

        context File.basename(sub_dir_name) do
          testcases = Dir.glob("#{sub_dir_name}/#{TESTCASES}")
{'fraction_non_alphanumeric': 0.13512119649303764, 'fraction_numerical': 0.0041258380608561115, 'mean_word_length': 4.950920245398773, 'pattern_counts': {'":': 0, '<': 3, '<?xml version=': 0, '>': 7, 'https://': 0, 'lorem ipsum': 0, 'www.': 0, 'xml': 0}, 'pii_count': 0, 'substrings_counts': 0, 'word_list_counts': {'cursed_substrings.json': 0, 'profanity_word_list.json': 0, 'sexual_word_list.json': 0, 'zh_pornsignals.json': 0}}
{'dir': 'git-commits-cleaned', 'id': '3820468', 'n_tokens_mistral': 681, 'n_tokens_neox': 647, 'n_words': 128}