From d6ddd7e6dabd018d24590e9f6be9b31305092026 Mon Sep 17 00:00:00 2001 From: dblock Date: Wed, 29 Jun 2011 16:48:23 -0400 Subject: [PATCH] Upgraded rspec, now runs after bundle instal. --- .rspec | 2 ++ Gemfile | 12 ++++++++---- Gemfile.lock | 14 ++++++++++++-- spec/analytical_spec.rb | 2 +- spec/spec_helper.rb | 9 ++++++--- 5 files changed, 29 insertions(+), 10 deletions(-) create mode 100644 .rspec diff --git a/.rspec b/.rspec new file mode 100644 index 0000000..5fb4323 --- /dev/null +++ b/.rspec @@ -0,0 +1,2 @@ +--colour + diff --git a/Gemfile b/Gemfile index 466240e..20edc48 100644 --- a/Gemfile +++ b/Gemfile @@ -1,12 +1,16 @@ source :rubygems -group :development do +group :development, :test do + gem 'rails', '~> 2.3' gem 'jeweler' - gem 'rspec', '1.3' + gem 'rspec', '~> 2.6.0' + gem 'rspec-core', '~> 2.6.4' + gem 'rspec-expectations', '~> 2.6.0' + gem 'rspec-mocks', '~> 2.6.0' gem 'diff-lcs' - gem 'rails', '~> 2.3' gem 'guard' gem 'guard-rspec' gem 'rb-fsevent' gem 'growl' -end \ No newline at end of file +end + diff --git a/Gemfile.lock b/Gemfile.lock index d956e65..06d59ca 100644 --- a/Gemfile.lock +++ b/Gemfile.lock @@ -39,7 +39,14 @@ GEM rake (>= 0.8.3) rake (0.8.7) rb-fsevent (0.4.0) - rspec (1.3.0) + rspec (2.6.0) + rspec-core (~> 2.6.0) + rspec-expectations (~> 2.6.0) + rspec-mocks (~> 2.6.0) + rspec-core (2.6.4) + rspec-expectations (2.6.0) + diff-lcs (~> 1.1.2) + rspec-mocks (2.6.0) thor (0.14.6) PLATFORMS @@ -53,4 +60,7 @@ DEPENDENCIES jeweler rails (~> 2.3) rb-fsevent - rspec (= 1.3) + rspec (~> 2.6.0) + rspec-core (~> 2.6.4) + rspec-expectations (~> 2.6.0) + rspec-mocks (~> 2.6.0) diff --git a/spec/analytical_spec.rb b/spec/analytical_spec.rb index 86286d5..dbfaf4f 100644 --- a/spec/analytical_spec.rb +++ b/spec/analytical_spec.rb @@ -13,7 +13,7 @@ class DummyForInit extend Analytical def self.helper_method(*a); end def request - Spec::Mocks::Mock.new 'request', + RSpec::Mocks::Mock.new 'request', :'ssl?'=>true, :user_agent=>'Mozilla/5.0 (Macintosh; U; Intel Mac OS X 10.6; en-US; rv:1.9.2.3) Gecko/20100401 Firefox/3.6.3 GTB7.0' end diff --git a/spec/spec_helper.rb b/spec/spec_helper.rb index 70bbe45..c33d1e6 100644 --- a/spec/spec_helper.rb +++ b/spec/spec_helper.rb @@ -1,15 +1,18 @@ $LOAD_PATH.unshift(File.dirname(__FILE__)) $LOAD_PATH.unshift(File.join(File.dirname(__FILE__), '..', 'lib')) + +require 'rubygems' + require 'active_support' require 'active_support/core_ext' require 'active_support/json' require 'action_view' -require 'spec' -require 'spec/autorun' require 'analytical' -Spec::Runner.configure do |config| +RSpec.configure do |config| + config.mock_with :rspec + config.expect_with :rspec end module Rails