Skip to content

Switch have support to use the extracted gem #821

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Closed
wants to merge 1 commit into from
Closed
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion Gemfile
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@ source "https://rubygems.org"

gemspec

%w[rspec rspec-core rspec-expectations rspec-mocks].each do |lib|
%w[rspec rspec-core rspec-expectations rspec-mocks rspec-collection_matchers].each do |lib|
library_path = File.expand_path("../../#{lib}", __FILE__)
if File.exist?(library_path)
gem lib, :path => library_path
Expand Down
4 changes: 2 additions & 2 deletions lib/rspec/rails/matchers/have_extension.rb
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
require 'active_support/core_ext/module/aliasing'
require 'rspec/matchers/built_in/have'
require 'rspec/collection_matchers'

module RSpec::Rails::Matchers
module HaveExtensions
Expand Down Expand Up @@ -30,6 +30,6 @@ def description_with_errors_on_extensions
end
end

RSpec::Matchers::BuiltIn::Have.class_eval do
RSpec::CollectionMatchers::Have.class_eval do
include RSpec::Rails::Matchers::HaveExtensions
end
10 changes: 6 additions & 4 deletions rspec-rails.gemspec
Original file line number Diff line number Diff line change
Expand Up @@ -21,17 +21,19 @@ Gem::Specification.new do |s|
s.rdoc_options = ["--charset=UTF-8"]
s.require_path = "lib"

s.add_runtime_dependency(%q<activesupport>, [">= 3.0"])
s.add_runtime_dependency(%q<activemodel>, [">= 3.0"])
s.add_runtime_dependency(%q<actionpack>, [">= 3.0"])
s.add_runtime_dependency(%q<railties>, [">= 3.0"])
s.add_runtime_dependency "activesupport", ">= 3.0"
s.add_runtime_dependency "activemodel", ">= 3.0"
s.add_runtime_dependency "actionpack", ">= 3.0"
s.add_runtime_dependency "railties", ">= 3.0"

%w[core expectations mocks].each do |name|
if RSpec::Rails::Version::STRING =~ /[a-zA-Z]+/ # prerelease builds
s.add_runtime_dependency "rspec-#{name}", "= #{RSpec::Rails::Version::STRING}"
else
s.add_runtime_dependency "rspec-#{name}", "~> #{RSpec::Rails::Version::STRING.split('.')[0..1].concat(['0']).join('.')}"
end
end
s.add_runtime_dependency "rspec-collection_matchers"

s.add_development_dependency 'rake', '~> 10.0.0'
s.add_development_dependency 'cucumber', '~> 1.3.5'
Expand Down