I am unable to run rspec tests for db objects. I created a model using rails generator. Then I restarted the guards console. I am new to rails, so will appreciate if someone ca point out what is my obvious mistake :)
Below is the rspec file I have -
require 'spec_helper'
describe TasksController do
describe "Tasks" do
describe "GET/tasks" do
it "display some tasks" do
@task = Task.create :task => "Get it done"
visit tasks_path
page.should_have_content "Get it done"
end
end
end
end
I have my tests running through guard. Below is the error I receive -
Failures:
1) TasksController Tasks GET/tasks display some tasks Failure/Error: @task = Task.create :task => "Get it done" ActiveRecord::StatementInvalid: Could not find table 'tasks' # ./spec/controllers/tasks_controller_spec.rb:8:in `block (4 levels) in '