Skip to content

Instantly share code, notes, and snippets.

@lucatironi
Created February 10, 2013 11:55
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save lucatironi/4749349 to your computer and use it in GitHub Desktop.
Save lucatironi/4749349 to your computer and use it in GitHub Desktop.
require 'spec_helper'
describe Form do
context "ActiveRecord" do
it { should belong_to(:user) }
it { should have_many(:entries) }
it { should validate_presence_of(:mail_to_address) }
it { should validate_presence_of(:redirect_to_url) }
end
context "Callbacks" do
describe ".generate_token" do
specify { FactoryGirl.create(:form).token.size.should be(6) }
end
end
end
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment