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 4062076
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 20, 20262026-05-20T15:33:11+00:00 2026-05-20T15:33:11+00:00

I run: ruby -I test test/unit/job_test.rb from my application root directory, and I get:

  • 0

I run:

ruby -I test test/unit/job_test.rb

from my application root directory, and I get:

Loaded suite test/unit/job_test
Started
E
Finished in 2.046875 seconds.

1) Error:
   test_My_First_Test(JobTest):
   ActiveRecord::RecordNotUnique: Mysql2::Error: Duplicate entry '' 
   for key 'name':
   INSERT INTO `ac_buyers` (`created_at`, `updated_at`, `id`) VALUES 
   ('2011-03-10 06:04:06', '2011-03-10 06:04:06', 298486374)

What’s going on here ?

Why Rails tries to insert values to database ?

Here is test/unit/job_test.rb:

require 'test_helper'
class JobTest < ActiveSupport::TestCase
  test "My First Test" do
    assert false
  end
end
  • 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-05-20T15:33:12+00:00Added an answer on May 20, 2026 at 3:33 pm

    It seems like this is Rails fixtures. Look in test/fixtures and you will see some files generated by rails to seed your test database w/ data to test against. When you run your tests rails will insert them in your test DB.

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

Sidebar

Related Questions

Is it possible to run a ruby application as a Windows Service? I see
I want to run javascript/Python/Ruby inside my application. I have an application that creates
After our Ruby on Rails application has run for a while, it starts throwing
In ruby's test/unit, the software indicates how long it takes for the tests to
When running tests in Ruby's unit::test framework, is there a really easy way to
I'm working off these instructions: http://github.com/dcparker/ruby-gmail From the home directory I do a standard
I am trying to get Hudson to run my ruby based selenium tests. I
I'm following this tutorial (seems good) for Rails. After I run ruby script/generate scaffold
I want to be able to run unstrusted ruby code. I want to be
I want to run a standalone ruby script in which I need my RoR

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.