$:.unshift File.join(File.dirname(__FILE__), '..', '..', 'lib') require 'test/unit' require 'nitro/controller' class TestControllerAspect < Test::Unit::TestCase # :nodoc: all include Nitro class TestController < Controller attr_reader :aflag, :tflag post "@aflag = 25", :on => :list def list @aflag = 3 end end def test_aspect ctx = Context.new(Server.new) ctx.instance_variable_set '@session', {} c = TestController.new(ctx) c.list_action assert_equal 25, c.aflag end end