[rspec-users] help with rspec

שלומי צדוק shlomi at ben-hanna.com
Sun Jun 12 03:25:02 EDT 2011

Hi all,
My name is Shlomi Zadok - I am an old time PHP (mainly Drupal) developer and
I am doing my first application on Ruby on Rails ( I just love it!!)
I am trying to test my application with rspec and I am having problems.

I have to admit that I rushed with the development and neglected the testing
 - I have installed rspec & webrat only after finished the prototype, not
sure it is related.

The error I am getting is:
Failure/Error: Unable to find matching line from backtrace
uninitialized constant ActionController::TestCase::Assertions

You have encountered that question a lot huh? :)

Please find below my configurations:

I run Ubuntu 11.04
Rails 3.0.7
ruby 1.8.7 (2010-08-16 patchlevel 302) [i686-linux]
I use Aptana as an IDE

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

gem 'rails', '3.0.7'

# Bundle edge Rails instead:
# gem 'rails', :git => 'git://github.com/rails/rails.git'

gem 'sqlite3-ruby', :require => 'sqlite3'
# Enable gravatar
gem 'gravatar_image_tag', '1.0.0.pre2'
# Enable pagination
gem 'will_paginate', '3.0.pre2'
# Use unicorn as the web server
# gem 'unicorn'
# Enable jquery
gem 'jquery-rails'

# Enable tiny_mce
# gem 'tiny_mce'

# Enable amistad friendship manager
gem 'amistad'

# Enable authorization manager for user (who can see what)
gem 'cancan'

# Paperclip to add attachments to files
gem "paperclip", "~> 2.3"

# Deploy with Capistrano
# gem 'capistrano'

# To use debugger (ruby-debug for Ruby 1.8.7+, ruby-debug19 for Ruby 1.9.2+)
# gem 'ruby-debug'
# gem 'ruby-debug19'

# Bundle the extra gems:
# gem 'bj'
# gem 'nokogiri'
# gem 'sqlite3-ruby', :require => 'sqlite3'
# gem 'aws-s3', :require => 'aws/s3'

# Bundle gems for the local environment. Make sure to
# put test-only gems in this group so their generators
# and rake tasks are available in development mode:
# group :development, :test do
#   gem 'webrat'
# end

group :development do
  gem 'rspec-rails', '2.5.0'

group :test do
  gem 'rspec', '2.5.0'
  gem 'webrat', '0.7.1'

I started with a very simple test:
spec/controllers/pages_controller_spec.rb (literally copied from
require 'spec_helper'

describe PagesController do
  describe "GET 'home'" do
    it "should be successful" do
      get 'home'
      response.should be_success

Thank you so much for your help.

Shlomi Zadok <http://about.me/shlomizadok>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://rubyforge.org/pipermail/rspec-users/attachments/20110612/f977c9c4/attachment.html>

More information about the rspec-users mailing list