Sha256: c2c9ccc152400066e45980a84d2468689037d50041eecd16c1ebe86923575e21

Contents?: true

Size: 546 Bytes

Versions: 5

Compression:

Stored size: 546 Bytes

Contents

$:.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

Version data entries

5 entries across 5 versions & 1 rubygems

Version Path
nitro-0.22.0 test/nitro/tc_controller_aspect.rb
nitro-0.23.0 test/nitro/tc_controller_aspect.rb
nitro-0.24.0 test/nitro/tc_controller_aspect.rb
nitro-0.25.0 test/nitro/tc_controller_aspect.rb
nitro-0.26.0 test/nitro/tc_controller_aspect.rb