Skip to content

Instantly share code, notes, and snippets.

@azuby
Created October 17, 2011 03:58
Show Gist options
  • Select an option

  • Save azuby/1291913 to your computer and use it in GitHub Desktop.

Select an option

Save azuby/1291913 to your computer and use it in GitHub Desktop.
Failures:
1) User should require a first name
Failure/Error: no_name_user = User.new(@attr.merge(:first_name => ""))
ActiveRecord::StatementInvalid:
Could not find table 'users'
# ./spec/models/user_spec.rb:41:in `new'
# ./spec/models/user_spec.rb:41:in `block (2 levels) in <top (required)>'
2) User should require a last name
Failure/Error: no_name_user = User.new(@attr.merge(:last_name => ""))
ActiveRecord::StatementInvalid:
Could not find table 'users'
# ./spec/models/user_spec.rb:45:in `new'
# ./spec/models/user_spec.rb:45:in `block (2 levels) in <top (required)>'
3) User should reject first names that are too long
Failure/Error: long_name_user = User.new(@attr.merge(:first_name => long_name))
ActiveRecord::StatementInvalid:
Could not find table 'users'
# ./spec/models/user_spec.rb:50:in `new'
# ./spec/models/user_spec.rb:50:in `block (2 levels) in <top (required)>'
4) User should reject last names that are too long
Failure/Error: long_name_user = User.new(@attr.merge(:last_name => long_name))
ActiveRecord::StatementInvalid:
Could not find table 'users'
# ./spec/models/user_spec.rb:55:in `new'
# ./spec/models/user_spec.rb:55:in `block (2 levels) in <top (required)>'
Finished in 13.3 seconds
6 examples, 4 failures
Failed examples:
rspec ./spec/models/user_spec.rb:40 # User should require a first name
rspec ./spec/models/user_spec.rb:44 # User should require a last name
rspec ./spec/models/user_spec.rb:48 # User should reject first names that are too long
rspec ./spec/models/user_spec.rb:53 # User should reject last names that are too long
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment