views:

18

answers:

1

I have just installed Rspec and Rspec-rails. When i try to run the test, it says:

rake aborted!
Command /opt/local/bin/ruby -I"lib"  "/opt/local/lib/ruby/gems/1.8/gems/rspec-1.3.0/bin/spec" "spec/controllers/free_controller_spec.rb" --options "/Volumes/Trash/dev/app/trunk/spec/spec.opts" failed

Full log here: http://pastie.org/939211

However, my second "test" application with sqlite works with it. I think the problem is in my DB.

My ruby version is 1.8.7, i use mysql as database.

My files:

specs/spec_helper.rb

config/environment.rb

config/environments/test.rb

List of my gems

My test is just:

require 'spec_helper'

describe FreeController do

    it "should respond with success" do
      get 'index'
      response.should be_success
    end

end

I really can't understand the error, so i don't know how to fix it..

Additional question: should i use a fixtures and ActiveRecord, if i going to use Machinist for creating test data? What should i do to disable them?

+1  A: 

From your error log:

/app/models/thread.rb:1: superclass mismatch for class Thread (TypeError)

Is your model named Thread? You might have a name collision. Ruby has built-in class named Thread. Try renaming your model.

zetetic
Yes, it was! I hadn't use, but forgot to destroy it. Thanks)
FancyDancy