README in no_peeping_toms-1.0.1 vs README in no_peeping_toms-1.1.0

- old
+ new

@@ -3,12 +3,20 @@ Originally a plugin, now gemified. 'gem install no_peeping_toms' This plugin disables observers in your specs, so that model specs can run in complete isolation. -You can choose to run some code with observers turned on. This is useful when spec'ing an observer. For example, if you write the following observer: +To disable observers, place the following code in your test.rb, or spec_helper.rb, or wherever: + ActiveRecord::Observer.disable_observers + +You can easily reenable observers: + + ActiveRecord::Observer.enable_observers + +You can choose to run some code with specific observers turned on. This is useful when spec'ing an observer. For example, if you write the following observer: + class PersonObserver < ActiveRecord::Observer def before_update(person) old_person = Person.find person.id if old_person.name != person.name NameChange.create! :person => person, :old_name => old_person.name, :new_name => person.name @@ -36,7 +44,15 @@ lambda { @person.update_attribute :name, "Man Without a Name" }.should_not change(NameChange, :count) end end +Cool people who have contributed to NoPeepingToms: + * Brandon Keepers + * Corey Haines + * Jeff Siegel + * Drew Olson + * Zach Dennis + +If you think your name should be here, shoot me an email and I'll add it ASAP. Copyright (c) 2007-2010 Pat Maddox, released under the MIT license