Skip to content

Instantly share code, notes, and snippets.

@knewter
Created August 27, 2009 03:04
Show Gist options
  • Save knewter/176054 to your computer and use it in GitHub Desktop.
Save knewter/176054 to your computer and use it in GitHub Desktop.
require 'test_helper'
class PostTest < ActiveSupport::TestCase
should_validate_presence_of :contents
should_validate_presence_of :created_at
should_validate_presence_of :user_id
context "A Post" do
setup do
@post = Factory.build(:post)
end
should "be able to be saved" do
assert @post.save
end
end
end
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment