Sha256: 0e30947427f6cc2a85aa5ef7278d1f95ac73181e095eac99e0ef5d1801f61d8e
Contents?: true
Size: 695 Bytes
Versions: 26
Compression:
Stored size: 695 Bytes
Contents
require 'pact/consumer_contract/file_name' module Pact describe FileName do describe "file_path" do subject { FileName.file_path 'foo', 'bar', 'tmp/pacts' } it { is_expected.to eq 'tmp/pacts/foo-bar.json' } context "when unique is true" do subject { FileName.file_path 'foo', 'bar', 'tmp/pacts', unique: true } it { is_expected.to match %r{tmp/pacts/foo-bar-\d+.json} } end context "when the path includes backslashes" do subject { FileName.file_path 'foo', 'bar', 'c:\tmp\pacts' } it "changes them to forward slashes" do expect(subject).to eq "c:/tmp/pacts/foo-bar.json" end end end end end
Version data entries
26 entries across 26 versions & 1 rubygems