Sha256: a69bc11df3b1be1990996c7c0ce2f33c6854239469d1ae3d0ed4c6859d2580a8
Contents?: true
Size: 1.21 KB
Versions: 2
Compression:
Stored size: 1.21 KB
Contents
require 'rubygems' require File.dirname(__FILE__) + '/test_helper.rb' require 'around_ninja_subject' require 'before_ninja_subject' require 'after_ninja_subject' class TestNinjaDecorators < Test::Unit::TestCase def setup end def test_simple_around_filter ninja = AroundNinjaSubject.new assert_equal "common foo around", ninja.foo ninja.ret = "" assert_equal "common bar around", ninja.bar end def test_nested_around_filter ninja = AroundNinjaSubject.new assert_equal "nesting common nested around completed", ninja.nested end def test_simple_before_filter ninja = BeforeNinjaSubject.new assert_equal "common aroundfoo", ninja.foo ninja.ret = "" assert_equal "common aroundbar", ninja.bar end def test_nested_before_filter ninja = BeforeNinjaSubject.new assert_equal "nesting completedcommon aroundnested", ninja.nested end def test_simple_after_filter ninja = AfterNinjaSubject.new assert_equal "foocommon around", ninja.foo ninja.ret = "" assert_equal "barcommon around", ninja.bar end def test_nested_after_filter ninja = AfterNinjaSubject.new assert_equal "nestedcommon aroundnesting completed", ninja.nested end end
Version data entries
2 entries across 2 versions & 2 rubygems
Version | Path |
---|---|
haruska-ninja-decorators-0.6.0 | test/ninja_decorators_test.rb |
ninja-decorators-0.6.0 | test/ninja_decorators_test.rb |