Sign Up

Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.

Have an account? Sign In

Have an account? Sign In Now

Sign In

Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.

Sign Up Here

Forgot Password?

Don't have account, Sign Up Here

Forgot Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

Have an account? Sign In Now

You must login to ask a question.

Forgot Password?

Need An Account, Sign Up Here

Please briefly explain why you feel this question should be reported.

Please briefly explain why you feel this answer should be reported.

Please briefly explain why you feel this user should be reported.

Sign InSign Up

The Archive Base

The Archive Base Logo The Archive Base Logo

The Archive Base Navigation

  • Home
  • SEARCH
  • About Us
  • Blog
  • Contact Us
Search
Ask A Question

Mobile menu

Close
Ask a Question
  • Home
  • Add group
  • Groups page
  • Feed
  • User Profile
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Buy Points
  • Users
  • Help
  • Buy Theme
  • SEARCH
Home/ Questions/Q 8318901
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 8, 20262026-06-08T22:08:14+00:00 2026-06-08T22:08:14+00:00

The RSpec test suite for my project https://github.com/phoet/on_ruby fails when updating Rails from 3.2.6

  • 0

The RSpec test suite for my project https://github.com/phoet/on_ruby fails when updating Rails from 3.2.6 to 3.2.7.

rake spec
  1) Authorization should create an auth and a user from an auth-hash
     Failure/Error: Authorization.create_from_hash(auth)
     ActiveRecord::RecordNotUnique:
       SQLite3::ConstraintException: column nickname is not unique: INSERT INTO "users" ("admin", "available", "created_at", "description", "freelancer", "github", "hide_jobs", "image", "location", "name", "nickname", "slug", "updated_at", "url") VALUES (?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?)
     # ./app/models/user.rb:74:in `create_from_hash!'
     # ./app/models/authorization.rb:15:in `create_from_hash'
     # ./spec/models/authorization_spec.rb:23:in `block (3 levels) in <top (required)>'
     # ./spec/models/authorization_spec.rb:22:in `block (2 levels) in <top (required)>'

Google Geocoding API error: over query limit.                  | ETA:  00:00:03
  2) Location finder should find users within the default scope
     Failure/Error: Location.unscoped.all.size.should be(2)

       expected #<Fixnum:5> => 2
            got #<Fixnum:21> => 10

       Compared using equal?, which compares object identity,
       but expected and actual are not the same object. Use
       'actual.should eq(expected)' if you don't care about
       object identity in this example.
     # ./spec/models/location_spec.rb:16:in `block (3 levels) in <top (required)>'

This problem does not occur when running RSpec directly, nor does it occur on travis: http://travis-ci.org/#!/phoet/on_ruby/builds/1989858

It looks as if the transactions do not rollback properly. Did someone experience a similar behavior?

Any Ideas?

  • 1 1 Answer
  • 0 Views
  • 0 Followers
  • 0
Share
  • Facebook
  • Report

Leave an answer
Cancel reply

You must login to add an answer.

Forgot Password?

Need An Account, Sign Up Here

1 Answer

  • Voted
  • Oldest
  • Recent
  • Random
  1. Editorial Team
    Editorial Team
    2026-06-08T22:08:16+00:00Added an answer on June 8, 2026 at 10:08 pm

    I’m getting the same. From what I can tell, rails is now sets ENV[‘RAILS_ENV’]=development, so your tests are running against you development database. Try rake spec RAILS_ENV=test

    It looks like it’s this issue: https://github.com/rails/rails/issues/7175

    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

I am trying to build a test suite using Rspec and I have always
The rspec test fails when trying to click_button Create my account saying The action
When testing a JSON response from an RSPEC controller test using DHH's JBuilder, my
In our rspec test for rails 3.1.0 app, we use both Factory.build and Factory.attributes_for.
What are the best practices and tools to test email-sending using rspec with Rails?
I want to switch an existing rails application from rspec to minitest starting with
I'm using RSpec/Capybara as my test suite. I have some javascript that dynamically appends
I've started a Rails 3 project using Ruby 1.9.2 and Rspec 2 and my
My rspec test suite is slow. It takes about half a decade to run
I am trying to configure rake to generate reports from rspec using ci_reporter for

Explore

  • Home
  • Add group
  • Groups page
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Users
  • Help
  • SEARCH

Footer

© 2021 The Archive Base. All Rights Reserved
With Love by The Archive Base

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.