@@ -8,6 +8,7 @@ module Configuration
88 let ( :provider_name ) { 'provider-name' }
99 let ( :provider_version_tags ) { [ 'master' ] }
1010 let ( :base_url ) { "http://broker.org" }
11+ let ( :since ) { "2020-01-01" }
1112 let ( :basic_auth_options ) do
1213 {
1314 username : 'pact_broker_username' ,
@@ -27,7 +28,7 @@ module Configuration
2728 pact_broker_base_url base_url , basic_auth_options
2829 consumer_version_tags tags
2930 enable_pending true
30- include_wip_pacts_since "2020-01-01"
31+ include_wip_pacts_since since
3132 verbose true
3233 end
3334 end
@@ -44,14 +45,34 @@ module Configuration
4445 provider_version_tags ,
4546 base_url ,
4647 basic_auth_opts ,
47- options )
48+ options
49+ )
4850 subject
4951 end
5052
5153 it "adds a pact_uri_source to the provider world" do
5254 expect ( Pact . provider_world ) . to receive ( :add_pact_uri_source ) . with ( fetch_pacts )
5355 subject
5456 end
57+
58+ context "when since is a Date" do
59+ let ( :since ) { Date . new ( 2020 , 1 , 1 ) }
60+
61+ it "converts it to a string" do
62+ expect ( Pact ::PactBroker ::FetchPactURIsForVerification ) . to receive ( :new ) . with (
63+ anything ,
64+ anything ,
65+ anything ,
66+ anything ,
67+ anything ,
68+ {
69+ include_pending_status : true ,
70+ include_wip_pacts_since : since . xmlschema
71+ }
72+ )
73+ subject
74+ end
75+ end
5576 end
5677
5778 context "with a missing base url" do
0 commit comments