From 83410d5bc2ef889c71e6e53798f8dff7e1a03ff2 Mon Sep 17 00:00:00 2001 From: Ali Graham Date: Fri, 31 Jul 2015 16:13:16 +0930 Subject: [PATCH] hack around jruby bug with pact --- spec/service_consumers/pact_helper.rb | 15 +++++++++++++++ 1 file changed, 15 insertions(+) diff --git a/spec/service_consumers/pact_helper.rb b/spec/service_consumers/pact_helper.rb index cc24a6dc9..ddba7e064 100644 --- a/spec/service_consumers/pact_helper.rb +++ b/spec/service_consumers/pact_helper.rb @@ -21,6 +21,21 @@ require 'bundler' Bundler.require(:default, :test) +if 'java'.eql?(RUBY_PLATFORM) + module Pact + module MatchingRules + class Merge + def initialize expected, matching_rules, root_path + @expected = expected + @matching_rules = standardise_paths(matching_rules) + # @root_path = JsonPath.new(root_path).to_s # problematic line in jruby + @root_path = JsonPath.new(root_path).path.join + end + end + end + end +end + ActiveSupport.use_standard_json_time_format = true ActiveSupport.time_precision = 0