Sha256: 44743face267e01a30e6a10a0a684077b316daf9b76f7c9133c93e23d95e68c7

Contents?: true

Size: 946 Bytes

Versions: 7

Compression:

Stored size: 946 Bytes

Contents

require File.join(File.dirname(__FILE__), %w[.. spec_helper] )
require 'merb'
require 'action_controller'

describe Mole::Utils::Frameworks do     
  before( :all ) do        
    ::Mole.reset_configuration!
    ::Mole.initialize( :moleable => true )
  end
                                 
  it "should retrieve Merb controller actions correctly" do
    actions = Mole::Utils::Frameworks.merb_actions( MerbController )
    actions.sort.should == %w[blee fred]
  end

  it "should retrieve Rails controller actions correctly" do
    actions = Mole::Utils::Frameworks.rails_actions( RailsController )
    actions.sort.should == %w[blee fred]
  end
  
  class MerbController < Merb::Controller  
    def fred
    end
    
    def blee
    end
    
    private
    
    def duh
    end
  end      
  
  class RailsController < ActionController::Base
    def fred
    end
    
    def blee
    end
    
    private
    
    def duh
    end
  end
end

Version data entries

7 entries across 7 versions & 1 rubygems

Version Path
mole-1.0.0 spec/utils/framework_spec.rb
mole-0.0.1 spec/utils/framework_spec.rb
mole-1.0.1 spec/utils/framework_spec.rb
mole-1.0.3 spec/utils/framework_spec.rb
mole-1.0.2 spec/utils/framework_spec.rb
mole-1.0.4 spec/utils/framework_spec.rb
mole-1.0.5 spec/utils/framework_spec.rb