Sha256: 6156a2b8ca7519842311fb92d2e0965b4c4ebefde73f2e40166b4d99914d112c

Contents?: true

Size: 254 Bytes

Versions: 3

Compression:

Stored size: 254 Bytes

Contents

require 'sugar-high/delegate'

class Actor
  def act
    'actor'
  end
end

class Context
  delegate :act, :to => :actor

  def actor
    Actor.new
  end
end

describe 'delegate NOT already defined' do
  specify { Context.new.act.should == 'actor' }
end

Version data entries

3 entries across 3 versions & 1 rubygems

Version Path
sugar-high-0.7.2 spec/sugar-high/delegate_spec.rb
sugar-high-0.7.1 spec/sugar-high/delegate_spec.rb
sugar-high-0.7.0 spec/sugar-high/delegate_spec.rb