From 70fd2e916a37d45471efc518cda840014afb0417 Mon Sep 17 00:00:00 2001 From: Raphael Sofaer Date: Fri, 13 May 2011 17:47:15 -0700 Subject: [PATCH] Update rspec --- Gemfile.lock | 20 ++++++++++---------- lib/tasks/rspec.rake | 2 +- spec/models/user/posting_spec.rb | 2 +- spec/spec_helper.rb | 8 ++++---- spec/support/fixture_generation.rb | 2 +- 5 files changed, 17 insertions(+), 17 deletions(-) diff --git a/Gemfile.lock b/Gemfile.lock index 1312cdc57..84362325e 100644 --- a/Gemfile.lock +++ b/Gemfile.lock @@ -333,20 +333,20 @@ GEM vegas (~> 0.1.2) rest-client (1.6.1) mime-types (>= 1.16) - rspec (2.5.0) - rspec-core (~> 2.5.0) - rspec-expectations (~> 2.5.0) - rspec-mocks (~> 2.5.0) - rspec-core (2.5.1) - rspec-expectations (2.5.0) + rspec (2.6.0) + rspec-core (~> 2.6.0) + rspec-expectations (~> 2.6.0) + rspec-mocks (~> 2.6.0) + rspec-core (2.6.0) + rspec-expectations (2.6.0) diff-lcs (~> 1.1.2) rspec-instafail (0.1.7) - rspec-mocks (2.5.0) - rspec-rails (2.5.0) + rspec-mocks (2.6.0) + rspec-rails (2.6.0) actionpack (~> 3.0) activesupport (~> 3.0) railties (~> 3.0) - rspec (~> 2.5.0) + rspec (~> 2.6.0) ruby-debug (0.10.4) columnize (>= 0.1) ruby-debug-base (~> 0.10.4.0) @@ -384,7 +384,7 @@ GEM typhoeus (0.2.4) mime-types mime-types - tzinfo (0.3.26) + tzinfo (0.3.27) uuidtools (2.1.2) vegas (0.1.8) rack (>= 1.0.0) diff --git a/lib/tasks/rspec.rake b/lib/tasks/rspec.rake index bcc7e0311..adf6b776c 100644 --- a/lib/tasks/rspec.rake +++ b/lib/tasks/rspec.rake @@ -16,7 +16,7 @@ begin RSpec::Core::RakeTask.new(:spec => spec_prereq) desc "Run the specs with rcov" - Rspec::Core::RakeTask.new(:rcov => spec_prereq) do |t| + RSpec::Core::RakeTask.new(:rcov => spec_prereq) do |t| t.rcov = true t.rcov_opts = ['-Ispec', '--exclude', 'spec', '--exclude', 'gems'] end diff --git a/spec/models/user/posting_spec.rb b/spec/models/user/posting_spec.rb index 3b013233d..e9693af48 100644 --- a/spec/models/user/posting_spec.rb +++ b/spec/models/user/posting_spec.rb @@ -48,7 +48,7 @@ describe User do it 'returns a list of all valid aspects a user can post to' do aspect_ids = Aspect.all.map(&:id) user.aspects_from_ids(aspect_ids).map{|a| a}.should == - user.aspects.map{|a| a} #Rspec matchers ftw + user.aspects.map{|a| a} #RSpec matchers ftw end it "lets you post to your own aspects" do user.aspects_from_ids([aspect.id]).should == [aspect] diff --git a/spec/spec_helper.rb b/spec/spec_helper.rb index ddea02d78..4abb41cb1 100644 --- a/spec/spec_helper.rb +++ b/spec/spec_helper.rb @@ -24,10 +24,6 @@ support_files = Dir["#{File.dirname(__FILE__)}/support/**/*.rb"] - [fixture_buil support_files.each {|f| require f } require fixture_builder_file -Dir["#{File.dirname(__FILE__)}/shared_behaviors/**/*.rb"].each do |f| - require f -end - RSpec.configure do |config| config.include Devise::TestHelpers, :type => :controller config.mock_with :rspec @@ -50,6 +46,10 @@ RSpec.configure do |config| end end +Dir["#{File.dirname(__FILE__)}/shared_behaviors/**/*.rb"].each do |f| + require f +end + disable_typhoeus ProcessedImage.enable_processing = false diff --git a/spec/support/fixture_generation.rb b/spec/support/fixture_generation.rb index f79dc4987..d0961589e 100644 --- a/spec/support/fixture_generation.rb +++ b/spec/support/fixture_generation.rb @@ -1,4 +1,4 @@ -Rspec::Rails::ControllerExampleGroup.class_eval do +RSpec::Rails::ControllerExampleGroup.class_eval do # Saves the markup to a fixture file using the given name def save_fixture(markup, name, fixture_path=nil )