Topic: first rspec

This is my test

require 'spec_helper'

describe PagesController do

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

  describe "GET 'contact'" do
    it "should be successful" do
      get 'contact'
      response.should be_success
    end
  end
--
  describe "GET 'about'" do
    it "should be successful" do
      get 'about'
      response.should be_success
    end
  end

end

out put

Finished in 0.01428 seconds
3 examples, 3 failures

Failed examples:

rspec ./spec/controllers/pages_controller_spec.rb:6 # PagesController GET 'home' should be successful
rspec ./spec/controllers/pages_controller_spec.rb:13 # PagesController GET 'contact' should be successful
rspec ./spec/controllers/pages_controller_spec.rb:20 # PagesController GET 'about' should be successful

but the funny thing is when i go to the pages i do see them there



FULL OUT PUT

bundle exec rspec spec/
No DRb server is running. Running in local process instead ...
DEPRECATION WARNING: The InstanceMethods module inside ActiveSupport::Concern will be no longer included automatically. Please define instance methods directly in RSpec::Rails::SetupAndTeardownAdapter instead. (called from <top (required)> at /Users/moiseszaragoza/Sites/tweet/spec/controllers/pages_controller_spec.rb:3)
DEPRECATION WARNING: The InstanceMethods module inside ActiveSupport::Concern will be no longer included automatically. Please define instance methods directly in RSpec::Rails::TestUnitAssertionAdapter instead. (called from <top (required)> at /Users/moiseszaragoza/Sites/tweet/spec/controllers/pages_controller_spec.rb:3)
DEPRECATION WARNING: The InstanceMethods module inside ActiveSupport::Concern will be no longer included automatically. Please define instance methods directly in RSpec::Rails::ViewRendering instead. (called from <top (required)> at /Users/moiseszaragoza/Sites/tweet/spec/controllers/pages_controller_spec.rb:3)
DEPRECATION WARNING: The InstanceMethods module inside ActiveSupport::Concern will be no longer included automatically. Please define instance methods directly in RSpec::Rails::ControllerExampleGroup instead. (called from <top (required)> at /Users/moiseszaragoza/Sites/tweet/spec/controllers/pages_controller_spec.rb:3)
FFF

Failures:

  1) PagesController GET 'home' should be successful
     Failure/Error: Unable to find matching line from backtrace
     PG::Error:
       FATAL:  database "test" does not exist
     # /Users/moiseszaragoza/.rvm/gems/ruby-1.9.3-p125@tweet/gems/activerecord-3.2.3/lib/active_record/connection_adapters/postgresql_adapter.rb:1194:in `initialize'
     # /Users/moiseszaragoza/.rvm/gems/ruby-1.9.3-p125@tweet/gems/activerecord-3.2.3/lib/active_record/connection_adapters/postgresql_adapter.rb:1194:in `new'
     # /Users/moiseszaragoza/.rvm/gems/ruby-1.9.3-p125@tweet/gems/activerecord-3.2.3/lib/active_record/connection_adapters/postgresql_adapter.rb:1194:in `connect'
     # /Users/moiseszaragoza/.rvm/gems/ruby-1.9.3-p125@tweet/gems/activerecord-3.2.3/lib/active_record/connection_adapters/postgresql_adapter.rb:329:in `initialize'
     # /Users/moiseszaragoza/.rvm/gems/ruby-1.9.3-p125@tweet/gems/activerecord-3.2.3/lib/active_record/connection_adapters/postgresql_adapter.rb:28:in `new'
     # /Users/moiseszaragoza/.rvm/gems/ruby-1.9.3-p125@tweet/gems/activerecord-3.2.3/lib/active_record/connection_adapters/postgresql_adapter.rb:28:in `postgresql_connection'
     # /Users/moiseszaragoza/.rvm/gems/ruby-1.9.3-p125@tweet/gems/activerecord-3.2.3/lib/active_record/connection_adapters/abstract/connection_pool.rb:303:in `new_connection'
     # /Users/moiseszaragoza/.rvm/gems/ruby-1.9.3-p125@tweet/gems/activerecord-3.2.3/lib/active_record/connection_adapters/abstract/connection_pool.rb:313:in `checkout_new_connection'
     # /Users/moiseszaragoza/.rvm/gems/ruby-1.9.3-p125@tweet/gems/activerecord-3.2.3/lib/active_record/connection_adapters/abstract/connection_pool.rb:237:in `block (2 levels) in checkout'
     # /Users/moiseszaragoza/.rvm/gems/ruby-1.9.3-p125@tweet/gems/activerecord-3.2.3/lib/active_record/connection_adapters/abstract/connection_pool.rb:232:in `loop'
     # /Users/moiseszaragoza/.rvm/gems/ruby-1.9.3-p125@tweet/gems/activerecord-3.2.3/lib/active_record/connection_adapters/abstract/connection_pool.rb:232:in `block in checkout'
     # /Users/moiseszaragoza/.rvm/rubies/ruby-1.9.3-p125/lib/ruby/1.9.1/monitor.rb:211:in `mon_synchronize'
     # /Users/moiseszaragoza/.rvm/gems/ruby-1.9.3-p125@tweet/gems/activerecord-3.2.3/lib/active_record/connection_adapters/abstract/connection_pool.rb:229:in `checkout'
     # /Users/moiseszaragoza/.rvm/gems/ruby-1.9.3-p125@tweet/gems/activerecord-3.2.3/lib/active_record/connection_adapters/abstract/connection_pool.rb:95:in `connection'
     # /Users/moiseszaragoza/.rvm/gems/ruby-1.9.3-p125@tweet/gems/activerecord-3.2.3/lib/active_record/connection_adapters/abstract/connection_pool.rb:398:in `retrieve_connection'
     # /Users/moiseszaragoza/.rvm/gems/ruby-1.9.3-p125@tweet/gems/activerecord-3.2.3/lib/active_record/connection_adapters/abstract/connection_specification.rb:168:in `retrieve_connection'
     # /Users/moiseszaragoza/.rvm/gems/ruby-1.9.3-p125@tweet/gems/activerecord-3.2.3/lib/active_record/connection_adapters/abstract/connection_specification.rb:142:in `connection'
     # /Users/moiseszaragoza/.rvm/gems/ruby-1.9.3-p125@tweet/gems/activerecord-3.2.3/lib/active_record/fixtures.rb:450:in `create_fixtures'
     # /Users/moiseszaragoza/.rvm/gems/ruby-1.9.3-p125@tweet/gems/activerecord-3.2.3/lib/active_record/fixtures.rb:879:in `load_fixtures'
     # /Users/moiseszaragoza/.rvm/gems/ruby-1.9.3-p125@tweet/gems/activerecord-3.2.3/lib/active_record/fixtures.rb:833:in `setup_fixtures'
     # /Users/moiseszaragoza/.rvm/gems/ruby-1.9.3-p125@tweet/gems/rspec-rails-2.6.1/lib/rspec/rails/adapters.rb:11:in `block (2 levels) in setup'
     # /Users/moiseszaragoza/.rvm/gems/ruby-1.9.3-p125@tweet/gems/rspec-core-2.6.4/lib/rspec/core/hooks.rb:35:in `instance_eval'
     # /Users/moiseszaragoza/.rvm/gems/ruby-1.9.3-p125@tweet/gems/rspec-core-2.6.4/lib/rspec/core/hooks.rb:35:in `run_in'
     # /Users/moiseszaragoza/.rvm/gems/ruby-1.9.3-p125@tweet/gems/rspec-core-2.6.4/lib/rspec/core/hooks.rb:70:in `block in run_all'
     # /Users/moiseszaragoza/.rvm/gems/ruby-1.9.3-p125@tweet/gems/rspec-core-2.6.4/lib/rspec/core/hooks.rb:70:in `each'
     # /Users/moiseszaragoza/.rvm/gems/ruby-1.9.3-p125@tweet/gems/rspec-core-2.6.4/lib/rspec/core/hooks.rb:70:in `run_all'
     # /Users/moiseszaragoza/.rvm/gems/ruby-1.9.3-p125@tweet/gems/rspec-core-2.6.4/lib/rspec/core/hooks.rb:116:in `run_hook'
     # /Users/moiseszaragoza/.rvm/gems/ruby-1.9.3-p125@tweet/gems/rspec-core-2.6.4/lib/rspec/core/example_group.rb:221:in `block in eval_before_eachs'
     # /Users/moiseszaragoza/.rvm/gems/ruby-1.9.3-p125@tweet/gems/rspec-core-2.6.4/lib/rspec/core/example_group.rb:221:in `each'
     # /Users/moiseszaragoza/.rvm/gems/ruby-1.9.3-p125@tweet/gems/rspec-core-2.6.4/lib/rspec/core/example_group.rb:221:in `eval_before_eachs'
     # /Users/moiseszaragoza/.rvm/gems/ruby-1.9.3-p125@tweet/gems/rspec-core-2.6.4/lib/rspec/core/example.rb:145:in `run_before_each'
     # /Users/moiseszaragoza/.rvm/gems/ruby-1.9.3-p125@tweet/gems/rspec-core-2.6.4/lib/rspec/core/example.rb:47:in `block in run'
     # /Users/moiseszaragoza/.rvm/gems/ruby-1.9.3-p125@tweet/gems/rspec-core-2.6.4/lib/rspec/core/example.rb:107:in `with_around_hooks'
     # /Users/moiseszaragoza/.rvm/gems/ruby-1.9.3-p125@tweet/gems/rspec-core-2.6.4/lib/rspec/core/example.rb:45:in `run'
     # /Users/moiseszaragoza/.rvm/gems/ruby-1.9.3-p125@tweet/gems/rspec-core-2.6.4/lib/rspec/core/example_group.rb:294:in `block in run_examples'
     # /Users/moiseszaragoza/.rvm/gems/ruby-1.9.3-p125@tweet/gems/rspec-core-2.6.4/lib/rspec/core/example_group.rb:290:in `map'
     # /Users/moiseszaragoza/.rvm/gems/ruby-1.9.3-p125@tweet/gems/rspec-core-2.6.4/lib/rspec/core/example_group.rb:290:in `run_examples'
     # /Users/moiseszaragoza/.rvm/gems/ruby-1.9.3-p125@tweet/gems/rspec-core-2.6.4/lib/rspec/core/example_group.rb:262:in `run'
     # /Users/moiseszaragoza/.rvm/gems/ruby-1.9.3-p125@tweet/gems/rspec-core-2.6.4/lib/rspec/core/example_group.rb:263:in `block in run'
     # /Users/moiseszaragoza/.rvm/gems/ruby-1.9.3-p125@tweet/gems/rspec-core-2.6.4/lib/rspec/core/example_group.rb:263:in `map'
     # /Users/moiseszaragoza/.rvm/gems/ruby-1.9.3-p125@tweet/gems/rspec-core-2.6.4/lib/rspec/core/example_group.rb:263:in `run'
     # /Users/moiseszaragoza/.rvm/gems/ruby-1.9.3-p125@tweet/gems/rspec-core-2.6.4/lib/rspec/core/command_line.rb:24:in `block (2 levels) in run'
     # /Users/moiseszaragoza/.rvm/gems/ruby-1.9.3-p125@tweet/gems/rspec-core-2.6.4/lib/rspec/core/command_line.rb:24:in `map'
     # /Users/moiseszaragoza/.rvm/gems/ruby-1.9.3-p125@tweet/gems/rspec-core-2.6.4/lib/rspec/core/command_line.rb:24:in `block in run'
     # /Users/moiseszaragoza/.rvm/gems/ruby-1.9.3-p125@tweet/gems/rspec-core-2.6.4/lib/rspec/core/reporter.rb:12:in `report'
     # /Users/moiseszaragoza/.rvm/gems/ruby-1.9.3-p125@tweet/gems/rspec-core-2.6.4/lib/rspec/core/command_line.rb:21:in `run'
     # /Users/moiseszaragoza/.rvm/gems/ruby-1.9.3-p125@tweet/gems/rspec-core-2.6.4/lib/rspec/core/runner.rb:80:in `run_in_process'
     # /Users/moiseszaragoza/.rvm/gems/ruby-1.9.3-p125@tweet/gems/rspec-core-2.6.4/lib/rspec/core/runner.rb:66:in `rescue in run'
     # /Users/moiseszaragoza/.rvm/gems/ruby-1.9.3-p125@tweet/gems/rspec-core-2.6.4/lib/rspec/core/runner.rb:62:in `run'
     # /Users/moiseszaragoza/.rvm/gems/ruby-1.9.3-p125@tweet/gems/rspec-core-2.6.4/lib/rspec/core/runner.rb:11:in `block in autorun'

  2) PagesController GET 'contact' should be successful
     Failure/Error: Unable to find matching line from backtrace
     PG::Error:
       FATAL:  database "test" does not exist
     # /Users/moiseszaragoza/.rvm/gems/ruby-1.9.3-p125@tweet/gems/activerecord-3.2.3/lib/active_record/connection_adapters/postgresql_adapter.rb:1194:in `initialize'
     # /Users/moiseszaragoza/.rvm/gems/ruby-1.9.3-p125@tweet/gems/activerecord-3.2.3/lib/active_record/connection_adapters/postgresql_adapter.rb:1194:in `new'
     # /Users/moiseszaragoza/.rvm/gems/ruby-1.9.3-p125@tweet/gems/activerecord-3.2.3/lib/active_record/connection_adapters/postgresql_adapter.rb:1194:in `connect'
     # /Users/moiseszaragoza/.rvm/gems/ruby-1.9.3-p125@tweet/gems/activerecord-3.2.3/lib/active_record/connection_adapters/postgresql_adapter.rb:329:in `initialize'
     # /Users/moiseszaragoza/.rvm/gems/ruby-1.9.3-p125@tweet/gems/activerecord-3.2.3/lib/active_record/connection_adapters/postgresql_adapter.rb:28:in `new'
     # /Users/moiseszaragoza/.rvm/gems/ruby-1.9.3-p125@tweet/gems/activerecord-3.2.3/lib/active_record/connection_adapters/postgresql_adapter.rb:28:in `postgresql_connection'
     # /Users/moiseszaragoza/.rvm/gems/ruby-1.9.3-p125@tweet/gems/activerecord-3.2.3/lib/active_record/connection_adapters/abstract/connection_pool.rb:303:in `new_connection'
     # /Users/moiseszaragoza/.rvm/gems/ruby-1.9.3-p125@tweet/gems/activerecord-3.2.3/lib/active_record/connection_adapters/abstract/connection_pool.rb:313:in `checkout_new_connection'
     # /Users/moiseszaragoza/.rvm/gems/ruby-1.9.3-p125@tweet/gems/activerecord-3.2.3/lib/active_record/connection_adapters/abstract/connection_pool.rb:237:in `block (2 levels) in checkout'
     # /Users/moiseszaragoza/.rvm/gems/ruby-1.9.3-p125@tweet/gems/activerecord-3.2.3/lib/active_record/connection_adapters/abstract/connection_pool.rb:232:in `loop'
     # /Users/moiseszaragoza/.rvm/gems/ruby-1.9.3-p125@tweet/gems/activerecord-3.2.3/lib/active_record/connection_adapters/abstract/connection_pool.rb:232:in `block in checkout'
     # /Users/moiseszaragoza/.rvm/rubies/ruby-1.9.3-p125/lib/ruby/1.9.1/monitor.rb:211:in `mon_synchronize'
     # /Users/moiseszaragoza/.rvm/gems/ruby-1.9.3-p125@tweet/gems/activerecord-3.2.3/lib/active_record/connection_adapters/abstract/connection_pool.rb:229:in `checkout'
     # /Users/moiseszaragoza/.rvm/gems/ruby-1.9.3-p125@tweet/gems/activerecord-3.2.3/lib/active_record/connection_adapters/abstract/connection_pool.rb:95:in `connection'
     # /Users/moiseszaragoza/.rvm/gems/ruby-1.9.3-p125@tweet/gems/activerecord-3.2.3/lib/active_record/connection_adapters/abstract/connection_pool.rb:398:in `retrieve_connection'
     # /Users/moiseszaragoza/.rvm/gems/ruby-1.9.3-p125@tweet/gems/activerecord-3.2.3/lib/active_record/connection_adapters/abstract/connection_specification.rb:168:in `retrieve_connection'
     # /Users/moiseszaragoza/.rvm/gems/ruby-1.9.3-p125@tweet/gems/activerecord-3.2.3/lib/active_record/connection_adapters/abstract/connection_specification.rb:142:in `connection'
     # /Users/moiseszaragoza/.rvm/gems/ruby-1.9.3-p125@tweet/gems/activerecord-3.2.3/lib/active_record/fixtures.rb:450:in `create_fixtures'
     # /Users/moiseszaragoza/.rvm/gems/ruby-1.9.3-p125@tweet/gems/activerecord-3.2.3/lib/active_record/fixtures.rb:879:in `load_fixtures'
     # /Users/moiseszaragoza/.rvm/gems/ruby-1.9.3-p125@tweet/gems/activerecord-3.2.3/lib/active_record/fixtures.rb:833:in `setup_fixtures'
     # /Users/moiseszaragoza/.rvm/gems/ruby-1.9.3-p125@tweet/gems/rspec-rails-2.6.1/lib/rspec/rails/adapters.rb:11:in `block (2 levels) in setup'
     # /Users/moiseszaragoza/.rvm/gems/ruby-1.9.3-p125@tweet/gems/rspec-core-2.6.4/lib/rspec/core/hooks.rb:35:in `instance_eval'
     # /Users/moiseszaragoza/.rvm/gems/ruby-1.9.3-p125@tweet/gems/rspec-core-2.6.4/lib/rspec/core/hooks.rb:35:in `run_in'
     # /Users/moiseszaragoza/.rvm/gems/ruby-1.9.3-p125@tweet/gems/rspec-core-2.6.4/lib/rspec/core/hooks.rb:70:in `block in run_all'
     # /Users/moiseszaragoza/.rvm/gems/ruby-1.9.3-p125@tweet/gems/rspec-core-2.6.4/lib/rspec/core/hooks.rb:70:in `each'
     # /Users/moiseszaragoza/.rvm/gems/ruby-1.9.3-p125@tweet/gems/rspec-core-2.6.4/lib/rspec/core/hooks.rb:70:in `run_all'
     # /Users/moiseszaragoza/.rvm/gems/ruby-1.9.3-p125@tweet/gems/rspec-core-2.6.4/lib/rspec/core/hooks.rb:116:in `run_hook'
     # /Users/moiseszaragoza/.rvm/gems/ruby-1.9.3-p125@tweet/gems/rspec-core-2.6.4/lib/rspec/core/example_group.rb:221:in `block in eval_before_eachs'
     # /Users/moiseszaragoza/.rvm/gems/ruby-1.9.3-p125@tweet/gems/rspec-core-2.6.4/lib/rspec/core/example_group.rb:221:in `each'
     # /Users/moiseszaragoza/.rvm/gems/ruby-1.9.3-p125@tweet/gems/rspec-core-2.6.4/lib/rspec/core/example_group.rb:221:in `eval_before_eachs'
     # /Users/moiseszaragoza/.rvm/gems/ruby-1.9.3-p125@tweet/gems/rspec-core-2.6.4/lib/rspec/core/example.rb:145:in `run_before_each'
     # /Users/moiseszaragoza/.rvm/gems/ruby-1.9.3-p125@tweet/gems/rspec-core-2.6.4/lib/rspec/core/example.rb:47:in `block in run'
     # /Users/moiseszaragoza/.rvm/gems/ruby-1.9.3-p125@tweet/gems/rspec-core-2.6.4/lib/rspec/core/example.rb:107:in `with_around_hooks'
     # /Users/moiseszaragoza/.rvm/gems/ruby-1.9.3-p125@tweet/gems/rspec-core-2.6.4/lib/rspec/core/example.rb:45:in `run'
     # /Users/moiseszaragoza/.rvm/gems/ruby-1.9.3-p125@tweet/gems/rspec-core-2.6.4/lib/rspec/core/example_group.rb:294:in `block in run_examples'
     # /Users/moiseszaragoza/.rvm/gems/ruby-1.9.3-p125@tweet/gems/rspec-core-2.6.4/lib/rspec/core/example_group.rb:290:in `map'
     # /Users/moiseszaragoza/.rvm/gems/ruby-1.9.3-p125@tweet/gems/rspec-core-2.6.4/lib/rspec/core/example_group.rb:290:in `run_examples'
     # /Users/moiseszaragoza/.rvm/gems/ruby-1.9.3-p125@tweet/gems/rspec-core-2.6.4/lib/rspec/core/example_group.rb:262:in `run'
     # /Users/moiseszaragoza/.rvm/gems/ruby-1.9.3-p125@tweet/gems/rspec-core-2.6.4/lib/rspec/core/example_group.rb:263:in `block in run'
     # /Users/moiseszaragoza/.rvm/gems/ruby-1.9.3-p125@tweet/gems/rspec-core-2.6.4/lib/rspec/core/example_group.rb:263:in `map'
     # /Users/moiseszaragoza/.rvm/gems/ruby-1.9.3-p125@tweet/gems/rspec-core-2.6.4/lib/rspec/core/example_group.rb:263:in `run'
     # /Users/moiseszaragoza/.rvm/gems/ruby-1.9.3-p125@tweet/gems/rspec-core-2.6.4/lib/rspec/core/command_line.rb:24:in `block (2 levels) in run'
     # /Users/moiseszaragoza/.rvm/gems/ruby-1.9.3-p125@tweet/gems/rspec-core-2.6.4/lib/rspec/core/command_line.rb:24:in `map'
     # /Users/moiseszaragoza/.rvm/gems/ruby-1.9.3-p125@tweet/gems/rspec-core-2.6.4/lib/rspec/core/command_line.rb:24:in `block in run'
     # /Users/moiseszaragoza/.rvm/gems/ruby-1.9.3-p125@tweet/gems/rspec-core-2.6.4/lib/rspec/core/reporter.rb:12:in `report'
     # /Users/moiseszaragoza/.rvm/gems/ruby-1.9.3-p125@tweet/gems/rspec-core-2.6.4/lib/rspec/core/command_line.rb:21:in `run'
     # /Users/moiseszaragoza/.rvm/gems/ruby-1.9.3-p125@tweet/gems/rspec-core-2.6.4/lib/rspec/core/runner.rb:80:in `run_in_process'
     # /Users/moiseszaragoza/.rvm/gems/ruby-1.9.3-p125@tweet/gems/rspec-core-2.6.4/lib/rspec/core/runner.rb:66:in `rescue in run'
     # /Users/moiseszaragoza/.rvm/gems/ruby-1.9.3-p125@tweet/gems/rspec-core-2.6.4/lib/rspec/core/runner.rb:62:in `run'
     # /Users/moiseszaragoza/.rvm/gems/ruby-1.9.3-p125@tweet/gems/rspec-core-2.6.4/lib/rspec/core/runner.rb:11:in `block in autorun'

  3) PagesController GET 'about' should be successful
     Failure/Error: Unable to find matching line from backtrace
     PG::Error:
       FATAL:  database "test" does not exist
     # /Users/moiseszaragoza/.rvm/gems/ruby-1.9.3-p125@tweet/gems/activerecord-3.2.3/lib/active_record/connection_adapters/postgresql_adapter.rb:1194:in `initialize'
     # /Users/moiseszaragoza/.rvm/gems/ruby-1.9.3-p125@tweet/gems/activerecord-3.2.3/lib/active_record/connection_adapters/postgresql_adapter.rb:1194:in `new'
     # /Users/moiseszaragoza/.rvm/gems/ruby-1.9.3-p125@tweet/gems/activerecord-3.2.3/lib/active_record/connection_adapters/postgresql_adapter.rb:1194:in `connect'
     # /Users/moiseszaragoza/.rvm/gems/ruby-1.9.3-p125@tweet/gems/activerecord-3.2.3/lib/active_record/connection_adapters/postgresql_adapter.rb:329:in `initialize'
     # /Users/moiseszaragoza/.rvm/gems/ruby-1.9.3-p125@tweet/gems/activerecord-3.2.3/lib/active_record/connection_adapters/postgresql_adapter.rb:28:in `new'
     # /Users/moiseszaragoza/.rvm/gems/ruby-1.9.3-p125@tweet/gems/activerecord-3.2.3/lib/active_record/connection_adapters/postgresql_adapter.rb:28:in `postgresql_connection'
     # /Users/moiseszaragoza/.rvm/gems/ruby-1.9.3-p125@tweet/gems/activerecord-3.2.3/lib/active_record/connection_adapters/abstract/connection_pool.rb:303:in `new_connection'
     # /Users/moiseszaragoza/.rvm/gems/ruby-1.9.3-p125@tweet/gems/activerecord-3.2.3/lib/active_record/connection_adapters/abstract/connection_pool.rb:313:in `checkout_new_connection'
     # /Users/moiseszaragoza/.rvm/gems/ruby-1.9.3-p125@tweet/gems/activerecord-3.2.3/lib/active_record/connection_adapters/abstract/connection_pool.rb:237:in `block (2 levels) in checkout'
     # /Users/moiseszaragoza/.rvm/gems/ruby-1.9.3-p125@tweet/gems/activerecord-3.2.3/lib/active_record/connection_adapters/abstract/connection_pool.rb:232:in `loop'
     # /Users/moiseszaragoza/.rvm/gems/ruby-1.9.3-p125@tweet/gems/activerecord-3.2.3/lib/active_record/connection_adapters/abstract/connection_pool.rb:232:in `block in checkout'
     # /Users/moiseszaragoza/.rvm/rubies/ruby-1.9.3-p125/lib/ruby/1.9.1/monitor.rb:211:in `mon_synchronize'
     # /Users/moiseszaragoza/.rvm/gems/ruby-1.9.3-p125@tweet/gems/activerecord-3.2.3/lib/active_record/connection_adapters/abstract/connection_pool.rb:229:in `checkout'
     # /Users/moiseszaragoza/.rvm/gems/ruby-1.9.3-p125@tweet/gems/activerecord-3.2.3/lib/active_record/connection_adapters/abstract/connection_pool.rb:95:in `connection'
     # /Users/moiseszaragoza/.rvm/gems/ruby-1.9.3-p125@tweet/gems/activerecord-3.2.3/lib/active_record/connection_adapters/abstract/connection_pool.rb:398:in `retrieve_connection'
     # /Users/moiseszaragoza/.rvm/gems/ruby-1.9.3-p125@tweet/gems/activerecord-3.2.3/lib/active_record/connection_adapters/abstract/connection_specification.rb:168:in `retrieve_connection'
     # /Users/moiseszaragoza/.rvm/gems/ruby-1.9.3-p125@tweet/gems/activerecord-3.2.3/lib/active_record/connection_adapters/abstract/connection_specification.rb:142:in `connection'
     # /Users/moiseszaragoza/.rvm/gems/ruby-1.9.3-p125@tweet/gems/activerecord-3.2.3/lib/active_record/fixtures.rb:450:in `create_fixtures'
     # /Users/moiseszaragoza/.rvm/gems/ruby-1.9.3-p125@tweet/gems/activerecord-3.2.3/lib/active_record/fixtures.rb:879:in `load_fixtures'
     # /Users/moiseszaragoza/.rvm/gems/ruby-1.9.3-p125@tweet/gems/activerecord-3.2.3/lib/active_record/fixtures.rb:833:in `setup_fixtures'
     # /Users/moiseszaragoza/.rvm/gems/ruby-1.9.3-p125@tweet/gems/rspec-rails-2.6.1/lib/rspec/rails/adapters.rb:11:in `block (2 levels) in setup'
     # /Users/moiseszaragoza/.rvm/gems/ruby-1.9.3-p125@tweet/gems/rspec-core-2.6.4/lib/rspec/core/hooks.rb:35:in `instance_eval'
     # /Users/moiseszaragoza/.rvm/gems/ruby-1.9.3-p125@tweet/gems/rspec-core-2.6.4/lib/rspec/core/hooks.rb:35:in `run_in'
     # /Users/moiseszaragoza/.rvm/gems/ruby-1.9.3-p125@tweet/gems/rspec-core-2.6.4/lib/rspec/core/hooks.rb:70:in `block in run_all'
     # /Users/moiseszaragoza/.rvm/gems/ruby-1.9.3-p125@tweet/gems/rspec-core-2.6.4/lib/rspec/core/hooks.rb:70:in `each'
     # /Users/moiseszaragoza/.rvm/gems/ruby-1.9.3-p125@tweet/gems/rspec-core-2.6.4/lib/rspec/core/hooks.rb:70:in `run_all'
     # /Users/moiseszaragoza/.rvm/gems/ruby-1.9.3-p125@tweet/gems/rspec-core-2.6.4/lib/rspec/core/hooks.rb:116:in `run_hook'
     # /Users/moiseszaragoza/.rvm/gems/ruby-1.9.3-p125@tweet/gems/rspec-core-2.6.4/lib/rspec/core/example_group.rb:221:in `block in eval_before_eachs'
     # /Users/moiseszaragoza/.rvm/gems/ruby-1.9.3-p125@tweet/gems/rspec-core-2.6.4/lib/rspec/core/example_group.rb:221:in `each'
     # /Users/moiseszaragoza/.rvm/gems/ruby-1.9.3-p125@tweet/gems/rspec-core-2.6.4/lib/rspec/core/example_group.rb:221:in `eval_before_eachs'
     # /Users/moiseszaragoza/.rvm/gems/ruby-1.9.3-p125@tweet/gems/rspec-core-2.6.4/lib/rspec/core/example.rb:145:in `run_before_each'
     # /Users/moiseszaragoza/.rvm/gems/ruby-1.9.3-p125@tweet/gems/rspec-core-2.6.4/lib/rspec/core/example.rb:47:in `block in run'
     # /Users/moiseszaragoza/.rvm/gems/ruby-1.9.3-p125@tweet/gems/rspec-core-2.6.4/lib/rspec/core/example.rb:107:in `with_around_hooks'
     # /Users/moiseszaragoza/.rvm/gems/ruby-1.9.3-p125@tweet/gems/rspec-core-2.6.4/lib/rspec/core/example.rb:45:in `run'
     # /Users/moiseszaragoza/.rvm/gems/ruby-1.9.3-p125@tweet/gems/rspec-core-2.6.4/lib/rspec/core/example_group.rb:294:in `block in run_examples'
     # /Users/moiseszaragoza/.rvm/gems/ruby-1.9.3-p125@tweet/gems/rspec-core-2.6.4/lib/rspec/core/example_group.rb:290:in `map'
     # /Users/moiseszaragoza/.rvm/gems/ruby-1.9.3-p125@tweet/gems/rspec-core-2.6.4/lib/rspec/core/example_group.rb:290:in `run_examples'
     # /Users/moiseszaragoza/.rvm/gems/ruby-1.9.3-p125@tweet/gems/rspec-core-2.6.4/lib/rspec/core/example_group.rb:262:in `run'
     # /Users/moiseszaragoza/.rvm/gems/ruby-1.9.3-p125@tweet/gems/rspec-core-2.6.4/lib/rspec/core/example_group.rb:263:in `block in run'
     # /Users/moiseszaragoza/.rvm/gems/ruby-1.9.3-p125@tweet/gems/rspec-core-2.6.4/lib/rspec/core/example_group.rb:263:in `map'
     # /Users/moiseszaragoza/.rvm/gems/ruby-1.9.3-p125@tweet/gems/rspec-core-2.6.4/lib/rspec/core/example_group.rb:263:in `run'
     # /Users/moiseszaragoza/.rvm/gems/ruby-1.9.3-p125@tweet/gems/rspec-core-2.6.4/lib/rspec/core/command_line.rb:24:in `block (2 levels) in run'
     # /Users/moiseszaragoza/.rvm/gems/ruby-1.9.3-p125@tweet/gems/rspec-core-2.6.4/lib/rspec/core/command_line.rb:24:in `map'
     # /Users/moiseszaragoza/.rvm/gems/ruby-1.9.3-p125@tweet/gems/rspec-core-2.6.4/lib/rspec/core/command_line.rb:24:in `block in run'
     # /Users/moiseszaragoza/.rvm/gems/ruby-1.9.3-p125@tweet/gems/rspec-core-2.6.4/lib/rspec/core/reporter.rb:12:in `report'
     # /Users/moiseszaragoza/.rvm/gems/ruby-1.9.3-p125@tweet/gems/rspec-core-2.6.4/lib/rspec/core/command_line.rb:21:in `run'
     # /Users/moiseszaragoza/.rvm/gems/ruby-1.9.3-p125@tweet/gems/rspec-core-2.6.4/lib/rspec/core/runner.rb:80:in `run_in_process'
     # /Users/moiseszaragoza/.rvm/gems/ruby-1.9.3-p125@tweet/gems/rspec-core-2.6.4/lib/rspec/core/runner.rb:66:in `rescue in run'
     # /Users/moiseszaragoza/.rvm/gems/ruby-1.9.3-p125@tweet/gems/rspec-core-2.6.4/lib/rspec/core/runner.rb:62:in `run'
     # /Users/moiseszaragoza/.rvm/gems/ruby-1.9.3-p125@tweet/gems/rspec-core-2.6.4/lib/rspec/core/runner.rb:11:in `block in autorun'

Finished in 0.01166 seconds
3 examples, 3 failures

Failed examples:

rspec ./spec/controllers/pages_controller_spec.rb:6 # PagesController GET 'home' should be successful
rspec ./spec/controllers/pages_controller_spec.rb:13 # PagesController GET 'contact' should be successful
rspec ./spec/controllers/pages_controller_spec.rb:20 # PagesController GET 'about' should be successful

Last edited by moiseszaragoza (2012-05-11 15:47:06)

Re: first rspec

Try this:

$ rake db:migrate
...
$ rake db:test:load

as mentioned in http://guides.rubyonrails.org/testing.html

Last edited by jasnow (2012-05-11 17:12:47)