Created
July 3, 2012 21:30
-
-
Save bernardeli/3043350 to your computer and use it in GitHub Desktop.
rspec config
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
RSpec.configure do |config| | |
config.before(:suite) do | |
ActiveRecord::Base.observers.disable :all | |
end | |
end |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
ActiveRecord::Observer.with_observers(:your_observe) do | |
# your assertion here | |
end |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment