Sha256: 1675d2725c42dc8a45adf42a704a26832fe10f2bda9b08a04c535651f806cf39

Contents?: true

Size: 560 Bytes

Versions: 1

Compression:

Stored size: 560 Bytes

Contents

$:.unshift File.join(File.dirname(__FILE__), '..', '..', 'lib')

require 'test/unit'

require 'nitro'

class TestControllerAspect < Test::Unit::TestCase # :nodoc: all
  include Nitro
  
  class TestController < Controller
    attr_reader :aflag, :tflag

    @template_root = []

    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

Version data entries

1 entries across 1 versions & 1 rubygems

Version Path
nitro-0.29.0 test/nitro/tc_controller_aspect.rb