spec/support/spec_support.rb in pact-support-0.2.1 vs spec/support/spec_support.rb in pact-support-0.3.0
- old
+ new
@@ -3,9 +3,18 @@
module Pact
module SpecSupport
extend self
+ def load_fixture name
+ File.read(File.join("./spec/fixtures", name))
+ end
+
+ def load_json_fixture name
+ require 'json'
+ JSON.parse(load_fixture(name))
+ end
+
def remove_ansicolor string
string.gsub(/\e\[(\d+)m/, '')
end
Pact::RSpec.with_rspec_2 do
\ No newline at end of file