Skip to content

Instantly share code, notes, and snippets.

@patricksrobertson
Created March 1, 2012 12:34
Show Gist options
  • Save patricksrobertson/1949550 to your computer and use it in GitHub Desktop.
Save patricksrobertson/1949550 to your computer and use it in GitHub Desktop.
Testing Rails internals
class User < ActiveRecord::Base
validates :name, presence: true
end
#spec
require 'spec_helper'
Describe User do
it { should validate_presence_of :name } #AMG RAILS IS WORKING!!!!!!!!
it { should_not validate_presence_of :nickname }
end
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment