Welcome to the Treehouse Community

Want to collaborate on code errors? Have bugs you need feedback on? Looking for an extra set of eyes on your latest project? Get support with fellow developers, designers, and programmers of all backgrounds and skill levels here with the Treehouse Community! While you're at it, check out some resources Treehouse students have shared here.

Looking to learn something new?

Treehouse offers a seven day free trial for new students. Get access to thousands of hours of content and join thousands of Treehouse students and alumni in the community today.

Start your free trial

Ruby

testing unit fails in ruby on rails

I'm working on unit testing and im getting 22 erros with one failing test so this what I added in my item_test.rb require 'test_helper'

class ItemTest < ActiveSupport::TestCase
setup do
   @item= Item.new
  end
test "Name not be blank and minimum 5 character" do
  @title.name=-1
   assert(!@job.valid?)
   @item=items
 end

end

and my item.rb code is

```ruby
class Item < ActiveRecord::Base
 # has_many :line_items
  validates :name, presence: true
```end

this is what im getting as my fail code

Minitest::UnexpectedError: ActiveRecord::StatementInvalid: SQLite3::SQLException: table items has no column named name: INSERT INTO "items" ("name", "initial_price", "sale_price", "created_at", "updated_at", "id") VALUES ('MyString', 9.99, 9.99, '2015-11-17 06:03:58', '2015-11-17 06:03:58', 980190962)

Finished in 0.16958s 22 tests, 0 assertions, 0 failures, 22 errors, 0 skips