Sha256: d72027b244bdc57047086993c889b7e716ab67664d7600f61f8ecca235eefbef

Contents?: true

Size: 544 Bytes

Versions: 4

Compression:

Stored size: 544 Bytes

Contents

require 'spec_helper'

describe LazyResource::ConfigurationDelegate do
  subject { LazyResource::ConfigurationDelegate.new }
  it 'forwards the method invocation to Resource if the method is defined there' do
    subject.site.should == 'http://example.com'
  end

  it 'forwards the invocation to LazyResource if the method is defined there' do
    subject.debug.should == false
  end

  it 'raises an error if the method is not defined on one of the delegated classes' do
    lambda { subject.foo }.should raise_error(NoMethodError)
  end
end

Version data entries

4 entries across 4 versions & 1 rubygems

Version Path
lazy_resource-0.5.0 spec/lazy_resource/configuration_delegate_spec.rb
lazy_resource-0.4.0 spec/lazy_resource/configuration_delegate_spec.rb
lazy_resource-0.3.3 spec/lazy_resource/configuration_delegate_spec.rb
lazy_resource-0.3.2 spec/lazy_resource/configuration_delegate_spec.rb