Skip to content

Instantly share code, notes, and snippets.

@guipdutra
Created December 16, 2013 19:21
Show Gist options
  • Select an option

  • Save guipdutra/7992732 to your computer and use it in GitHub Desktop.

Select an option

Save guipdutra/7992732 to your computer and use it in GitHub Desktop.
require "spec_helper_active_record"
require 'app/validations/email_template_common_validations'
require 'app/models/email_template'
describe EmailTemplate do
context 'validations' do
before do
stub_const("EmailTemplate::ImageUploader", Class.new)
end
it { should allow_value('email body').for(:body) }
it { should_not allow_value(3000 * "a").for(:body) }
end
end
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment