Skip to content

Instantly share code, notes, and snippets.

@hosh
Created April 20, 2010 14:49
Show Gist options
  • Select an option

  • Save hosh/372564 to your computer and use it in GitHub Desktop.

Select an option

Save hosh/372564 to your computer and use it in GitHub Desktop.
Sample Remarkable Macros
# In app/models/person.rb
class Person < ActiveRecord::Base
belongs_to :organization
validates_presence_of :name
validates_presence of :email
validates_uniqueness_of :email
end
# In spec/models/person_spec.rb
describe Person do
it { should validate_presence_of :name }
it { should validate_presence_of :email }
it { should validate_uniqueness_of :email }
end
@QueensDeeJay
Copy link

QueensDeeJay commented May 21, 2023 via email

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