From 9c9580c55b9bfc4304ccf9f5f3fadde1f62ed784 Mon Sep 17 00:00:00 2001 From: Ryan McGeary Date: Mon, 31 Jan 2011 16:25:43 -0500 Subject: [PATCH] Moved dependencies from the Gemfile to the gemspec * The Gemfile now contains just the source and a single `gemspec` declaration * See http://yehudakatz.com/2010/12/16/clarifying-the-roles-of-the-gemspec-and-gemfile/ * Also had to break out the modules under integrations/rspec into their nested equivalents (load order?) --- Gemfile | 8 +------- lib/shoulda/matchers/integrations/rspec.rb | 16 ++++++++++++---- shoulda-matchers.gemspec | 8 ++++++++ 3 files changed, 21 insertions(+), 11 deletions(-) diff --git a/Gemfile b/Gemfile index 93ba66c9..e1db7346 100644 --- a/Gemfile +++ b/Gemfile @@ -1,10 +1,4 @@ source 'http://rubygems.org' -gem 'rails', '3.0.3' -gem 'sqlite3-ruby', :require => 'sqlite3' -gem 'mocha' -gem 'rspec-rails' -gem 'ruby-debug' -gem 'cucumber' -gem "aruba" +gemspec diff --git a/lib/shoulda/matchers/integrations/rspec.rb b/lib/shoulda/matchers/integrations/rspec.rb index 927293ff..2e1b9286 100644 --- a/lib/shoulda/matchers/integrations/rspec.rb +++ b/lib/shoulda/matchers/integrations/rspec.rb @@ -9,15 +9,23 @@ end if defined?(::ActionController) require 'shoulda/matchers/action_controller' - module RSpec::Rails::ControllerExampleGroup - include Shoulda::Matchers::ActionController + module RSpec + module Rails + module ControllerExampleGroup + include Shoulda::Matchers::ActionController + end + end end end if defined?(::ActionMailer) require 'shoulda/matchers/action_mailer' - module RSpec::Rails::MailerExampleGroup - include Shoulda::Matchers::ActionMailer + module RSpec + module Rails + module MailerExampleGroup + include Shoulda::Matchers::ActionMailer + end + end end end diff --git a/shoulda-matchers.gemspec b/shoulda-matchers.gemspec index c9f20a48..842b974c 100644 --- a/shoulda-matchers.gemspec +++ b/shoulda-matchers.gemspec @@ -19,6 +19,14 @@ Gem::Specification.new do |s| s.summary = %q{Making tests easy on the fingers and eyes} s.description = %q{Making tests easy on the fingers and eyes} + s.add_development_dependency("rails", "3.0.3") + s.add_development_dependency("sqlite3-ruby", "~> 1.3.2") + s.add_development_dependency("mocha", "~> 0.9.10") + s.add_development_dependency("rspec-rails", "~> 2.3.0") + s.add_development_dependency("ruby-debug", "~> 0.10.4") + s.add_development_dependency("cucumber", "~> 0.10.0") + s.add_development_dependency("aruba", "~> 0.2.7") + if s.respond_to? :specification_version then s.specification_version = 3 else