disable observers in tests, enable as needed, tests are 20% faster

This commit is contained in:
Sam
2013-05-14 11:59:55 +10:00
parent fff46cf5aa
commit ef98b60184
11 changed files with 95 additions and 60 deletions

View File

@ -2,6 +2,10 @@ require 'spec_helper'
describe UserAction do
before do
ActiveRecord::Base.observers.enable :all
end
it { should validate_presence_of :action_type }
it { should validate_presence_of :user_id }