spec/integration/dm-observer_spec.rb in dm-observer-0.9.9 vs spec/integration/dm-observer_spec.rb in dm-observer-0.9.10

- old
+ new

@@ -1,11 +1,11 @@ require 'pathname' require Pathname(__FILE__).dirname.expand_path.parent + 'spec_helper' describe DataMapper::Observer do before :all do - class Adam + class ::Adam include DataMapper::Resource property :id, Integer, :serial => true property :name, String attr_accessor :done @@ -31,11 +31,11 @@ end end Adam.auto_migrate! - module Alcohol + module ::Alcohol class Beer include DataMapper::Resource property :id, Integer, :serial => true property :name, String @@ -51,11 +51,11 @@ end end Alcohol::Beer.auto_migrate! - class AdamObserver + class ::AdamObserver include DataMapper::Observer observe Adam before :save do @@ -70,10 +70,10 @@ raise "Call for help!" end end - class DrinkingObserver + class ::DrinkingObserver include DataMapper::Observer observe Adam, Alcohol::Beer after :drink do