test/glue/tc_aspects.rb in glue-0.29.0 vs test/glue/tc_aspects.rb in glue-0.30.0
- old
+ new
@@ -1,12 +1,10 @@
$:.unshift File.join(File.dirname(__FILE__), '..', '..', 'lib')
require 'test/unit'
-require 'glue/aspects'
+require 'facets/more/aspects'
-include Glue
-
class TestCaseAspects < Test::Unit::TestCase # :nodoc: all
class Monitor
def self.pre(this)
this.ma = 2
@@ -22,18 +20,18 @@
@ll = 5
end
end
module Tester
- include Glue::Aspects
+ include ::Aspects
attr_accessor :ta
pre { |this| this.ta = 5 }
end
class Dummy
- include Glue::Aspects
+ include ::Aspects
include Tester
attr_accessor :a, :b, :c
attr_accessor :oa, :ob
attr_accessor :ma, :mb
@@ -80,10 +78,10 @@
end
def test_all
Observer.wrap(Dummy, :hello)
Epilogue.new.wrap(Dummy, :hello)
- Glue::Aspects.wrap(Dummy, :hello)
+ ::Aspects.wrap(Dummy, :hello)
d = Dummy.new
d.hello(3)
assert_equal 5, d.a
assert_equal 1, d.b