Sha256: 49617bd93f674ca4d45d4ee1037c0cdca55f57c5a0e1d2dcc9d83292b9323fc0
Contents?: true
Size: 652 Bytes
Versions: 4
Compression:
Stored size: 652 Bytes
Contents
require 'spec_helper' module Alf module Support describe Config, "helpers" do let(:config_class){ Class.new(Config){ option :ready, Boolean, true option :hello, String, "world" } } subject{ config_class.helpers(:a_config) } it { should be_a(Module) } context 'when included in an object' do let(:obj){ Struct.new(:a_config).new(config_class.new) } before do obj.extend(subject) end it 'delegates when included in an object' do obj.ready?.should eq(true) end end end end end
Version data entries
4 entries across 4 versions & 1 rubygems