Sha256: f489e74ff90be27df10b5ef810dbefdc03f0bddebb4d8e339c206a781fdc284c
Contents?: true
Size: 1.28 KB
Versions: 3
Compression:
Stored size: 1.28 KB
Contents
require File.expand_path("../spec_helper", File.dirname(__FILE__)) describe Sprinkle::Configurable do module MyPrefix class Configurable include Sprinkle::Configurable end end before do @configurable = MyPrefix::Configurable.new @default = Proc.new { } @defaults = { :configurable => @default } @deployment.stub!(:defaults).and_return(@defaults) @deployment.stub!(:style) end it 'should be configurable via external defaults' do @configurable.should respond_to(:defaults) end it 'should select the defaults for the particular concrete installer class' do @deployment.should_receive(:defaults).and_return(@defaults) @defaults.should_receive(:[]).with(:configurable).and_return(@default) end it 'should configure the installer delivery mechansim' do @configurable.should_receive(:instance_eval) end it 'should maintain an options hash set arbitrarily via method missing' do @configurable.instance_eval do hsv 'gts' end @configurable.hsv.first.should == 'gts' end it 'should allow the delivery instance variable to be accessed' do @configurable.delivery = "string" @configurable.instance_variable_get(:@delivery).should eql("string") end after do @configurable.defaults(@deployment) end end
Version data entries
3 entries across 3 versions & 1 rubygems
Version | Path |
---|---|
sprinkle-0.3.6 | spec/sprinkle/configurable_spec.rb |
sprinkle-0.3.5 | spec/sprinkle/configurable_spec.rb |
sprinkle-0.3.4 | spec/sprinkle/configurable_spec.rb |