Sha256: 9848270b6dea4dac4acff59463627246f3db7ddea0e62fa6973c2613ebe3f6ea

Contents?: true

Size: 642 Bytes

Versions: 12

Compression:

Stored size: 642 Bytes

Contents

require File.dirname(__FILE__) + '/../spec_helper'

module M
  def m; end
end

class A
  include Dragonfly::Delegatable
  def a; end
end

class B < A
  include M
  def b; end
end

describe Dragonfly::Delegatable do
  
  describe "delegatable_methods" do
    it "should include all methods defined after including, including mixed-in and inherited" do
      B.new.delegatable_methods.should == [:b, :m, :a].map{|m| m.to_method_name }
    end
    
    it "should work the second (cached) time" do
      b = B.new
      b.delegatable_methods
      b.delegatable_methods.should == [:b, :m, :a].map{|m| m.to_method_name }
    end
    
  end
  
end

Version data entries

12 entries across 12 versions & 1 rubygems

Version Path
dragonfly-0.6.2 spec/dragonfly/delegatable_spec.rb
dragonfly-0.6.1 spec/dragonfly/delegatable_spec.rb
dragonfly-0.6.0 spec/dragonfly/delegatable_spec.rb
dragonfly-0.5.7 spec/dragonfly/delegatable_spec.rb
dragonfly-0.5.6 spec/dragonfly/delegatable_spec.rb
dragonfly-0.5.5 spec/dragonfly/delegatable_spec.rb
dragonfly-0.5.4 spec/dragonfly/delegatable_spec.rb
dragonfly-0.5.3 spec/dragonfly/delegatable_spec.rb
dragonfly-0.5.2 spec/dragonfly/delegatable_spec.rb
dragonfly-0.5.1 spec/dragonfly/delegatable_spec.rb
dragonfly-0.5.0 spec/dragonfly/delegatable_spec.rb
dragonfly-0.4.4 spec/dragonfly/delegatable_spec.rb