Sha256: 9e9b2023c91b14a41d79212fdeb135b2ec40b34092e996f020158111f467cbba

Contents?: true

Size: 596 Bytes

Versions: 3

Compression:

Stored size: 596 Bytes

Contents

require File.join(File.dirname(__FILE__), 'CONFIG.rb')

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', {}
    ctx.instance_variable_set '@headers', {}
    c = TestController.new(ctx)
    c.list_action
    
    assert_equal 25, c.aflag
  end

end

Version data entries

3 entries across 3 versions & 2 rubygems

Version Path
nitro-0.41.0 test/nitro/tc_controller_aspect.rb
nitro-0.40.0 test/nitro/tc_controller_aspect.rb
raw-0.49.0 test/nitro/tc_controller_aspect.rb