Skip to content

Commit

Permalink
feat: remove runtime dependency on rspec
Browse files Browse the repository at this point in the history
  • Loading branch information
bethesque committed Nov 4, 2020
1 parent 3c62ba5 commit aca30e2
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 4 deletions.
5 changes: 2 additions & 3 deletions lib/pact/rspec.rb
Original file line number Diff line number Diff line change
@@ -1,4 +1,3 @@
require 'rspec'
# This is horrible, must work out a better way of doing this
module Pact
module RSpec
Expand Down Expand Up @@ -31,11 +30,11 @@ def self.runner_defined?
end

def self.is_rspec_3
::RSpec::Core::Formatters.respond_to?(:register)
defined?(::Rspec) && ::RSpec::Core::Formatters.respond_to?(:register)
end

def self.is_rspec_2
!is_rspec_3
defined?(::Rspec) && !is_rspec_3
end

def self.with_rspec_3
Expand Down
2 changes: 1 addition & 1 deletion pact-support.gemspec
Original file line number Diff line number Diff line change
Expand Up @@ -20,11 +20,11 @@ Gem::Specification.new do |spec|
spec.require_paths = ["lib"]

spec.add_runtime_dependency "randexp", "~> 0.1.7"
spec.add_runtime_dependency "rspec", ">= 2.14"
spec.add_runtime_dependency "term-ansicolor", "~> 1.0"
spec.add_runtime_dependency "awesome_print", "~> 1.1"
spec.add_runtime_dependency "diff-lcs", "~> 1.4"

spec.add_development_dependency "rspec", ">= 2.14", "< 4.0"
spec.add_development_dependency "rake", "~> 10.0.3"
spec.add_development_dependency "webmock", "~> 3.3"
spec.add_development_dependency "pry"
Expand Down

0 comments on commit aca30e2

Please sign in to comment.