[rspec-users] my helper stubs aren't working (rspec2, rails3)

Kevin Lochner lists at ruby-forum.com
Sat Jan 1 02:12:21 EST 2011


David Chelimsky wrote in post #971734:

>
> Can you post your Gemfile and spec/spec_helper.rb files? I'm guessing
> there's a configuration problem of some sort.
>
> Cheers,
> David

David - thanks for following up so quickly, and happy new year.

#Gemfile:
source 'http://rubygems.org'

gem 'rails', '3.0.3'
gem 'mysql2'
gem 'activerecord-import'
gem 'htmldoc', '0.2.1'
gem 'moomerman-twitter_oauth', '0.2.1', :require => 'twitter_oauth'
gem 'twitter', '0.4.2'
gem 'roo', '1.2.3'
gem 'hashie'
gem 'ruby-hmac', :require => 'hmac-sha2'
gem 'httparty'
gem 'ruby-debug'
gem 'bitly'
gem 'soap4r'
gem 'rack-openid'
gem 'will_paginate', '~> 3.0.pre2'
gem "rake"
gem "hoe"
gem "rcov"
gem "right_http_connection"

group :test do
  gem 'webrat'
  gem 'factory_girl_rails'
  gem "rspec"
  gem "rspec-mocks"
  gem 'rspec-rails'
  gem 'remarkable'
  gem "remarkable_activerecord"
  gem "shoulda"
end

#spec/spec_helper.rb
ENV["RAILS_ENV"] ||= 'test'
require File.expand_path("../../config/environment", __FILE__)
require 'rspec/rails'
require 'shoulda'

# Requires supporting ruby files with custom matchers and macros, etc,
# in spec/support/ and its subdirectories.

Dir[Rails.root.join("spec/support/**/*.rb")].each {|f| require f}
include AuthenticatedTestHelper

RSpec.configure do |config|
  # == Mock Framework
  #
  # If you prefer to use mocha, flexmock or RR, uncomment the 
appropriate line:
  #
  # config.mock_with :mocha
  # config.mock_with :flexmock
  # config.mock_with :rr
  config.mock_with :rspec

  # Remove this line if you're not using ActiveRecord or ActiveRecord 
fixtures
  config.fixture_path = "#{::Rails.root}/spec/fixtures"

  # If you're not using ActiveRecord, or you'd prefer not to run each of 
your
  # examples within a transaction, remove the following line or assign 
false
  # instead of true.
  config.use_transactional_fixtures = true

  config.global_fixtures = :users
end

-- 
Posted via http://www.ruby-forum.com/.


More information about the rspec-users mailing list