File tree Expand file tree Collapse file tree
Expand file tree Collapse file tree Original file line number Diff line number Diff line change 11--color
22--format progress
3- --require spec_helper
Original file line number Diff line number Diff line change 1- require 'pact/support'
2- require 'pact/version'
3- require 'pact/configuration'
4- require 'pact/consumer'
5- require 'pact/provider'
6- require 'pact/consumer_contract'
1+
2+ # Selective loading of pact v1 and v2 based on environment variables
3+ if ENV [ 'PACT_RUBY_V1_ENABLE' ] != 'false'
4+ require 'pact/support'
5+ require 'pact/version'
6+ require 'pact/configuration'
7+ require 'pact/consumer'
8+ require 'pact/provider'
9+ require 'pact/consumer_contract'
10+ end
11+ if ENV [ 'PACT_RUBY_V2_ENABLE' ] == 'true'
12+ require 'pact/v2'
13+ end
Original file line number Diff line number Diff line change 1- RSpec ::Core ::RakeTask . new ( :spec )
2-
1+ RSpec ::Core ::RakeTask . new ( :spec ) do |t |
2+ t . pattern = 'spec/**/*_spec.rb'
3+ t . exclude_pattern = 'spec/pact/**/*_spec.rb,spec/v2/**/*_spec.rb'
4+ end
35# Need to run this in separate process because left over state from
46# testing the actual pact framework messes up the tests that actually
57# use pact.
6- RSpec ::Core ::RakeTask . new ( 'spec:provider' ) do | task |
7- task . pattern = " spec/service_providers/**/*_test.rb"
8+ RSpec ::Core ::RakeTask . new ( 'spec:provider' ) do |task |
9+ task . pattern = ' spec/service_providers/**/*_test.rb'
810end
911
1012task :set_active_support_on do
11- ENV [ " LOAD_ACTIVE_SUPPORT" ] = 'true'
13+ ENV [ ' LOAD_ACTIVE_SUPPORT' ] = 'true'
1214end
1315
14- desc " This is to ensure that the gem still works even when active support JSON is loaded."
15- task : spec_with_active_support => [ :set_active_support_on ] do
16+ desc ' This is to ensure that the gem still works even when active support JSON is loaded.'
17+ task spec_with_active_support : [ :set_active_support_on ] do
1618 Rake ::Task [ 'spec' ] . execute
1719end
You can’t perform that action at this time.
0 commit comments