README in no_peeping_toms-1.0.0 vs README in no_peeping_toms-1.0.1

- old
+ new

@@ -1,8 +1,10 @@ no_peeping_toms ============= +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: class PersonObserver < ActiveRecord::Observer @@ -26,15 +28,15 @@ lambda { @person.update_attribute :name, "Don Juan Demarco" }.should_not change(NameChange, :count) end # Run only a portion of code with certain observers turned on it "should register a name change with the person observer turned on" do - Person.with_observers(:person_observer) do + ActiveRecord::Observer.with_observers(:person_observer) do lambda { @person.update_attribute :name, "Don Juan Demarco" }.should change(NameChange, :count).by(1) end lambda { @person.update_attribute :name, "Man Without a Name" }.should_not change(NameChange, :count) end end -Copyright (c) 2007 Pat Maddox, released under the MIT license +Copyright (c) 2007-2010 Pat Maddox, released under the MIT license