Skip to content

Instantly share code, notes, and snippets.

@tyrel86
Created June 14, 2012 23:38
Show Gist options
  • Save tyrel86/2933672 to your computer and use it in GitHub Desktop.
Save tyrel86/2933672 to your computer and use it in GitHub Desktop.
require 'spec_helper'
describe User do
before { @user = FactoryGirl.build :user }
it "should have a factory ready to test" do
@user.should be_valid
end
end
@tyrel86
Copy link
Author

tyrel86 commented Jun 14, 2012

rspec 1 ↵
F

Failures:

  1. User should have a factory ready to test
    Failure/Error: before { @user = FactoryGirl.build :user }
    ActiveRecord::StatementInvalid:
    Mysql2::Error: Table 'CannaPages_test.users' doesn't exist: SHOW FULL FIELDS FROM users

    ./spec/models/user_spec.rb:4:in `block (2 levels) in <top (required)>'

Finished in 0.01193 seconds
1 example, 1 failure

Failed examples:

rspec ./spec/models/user_spec.rb:6 # User should have a factory ready to test

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment