Sha256: 2fa8c5ac73401100903fe3be57ddf4f35d90a3057ec393fe76883fd314adc808

Contents?: true

Size: 480 Bytes

Versions: 5

Compression:

Stored size: 480 Bytes

Contents

require 'spec_helper'

describe Fozzie::Config do

  subject do
    F = Class.new { extend Fozzie::Config } unless defined?(F)
    F
  end

  it { should respond_to(:configure) }
  it { should respond_to(:config) }
  it { should respond_to(:c) }
  
  it "allows dynamic assignment" do
    {
      :host    => 'somewhere.local',
      :port    => 99
    }.each do |field, val|
      F.configure {|c| c.send("#{field}=", val) }
      F.c.send(field).should == val
    end
  end

end

Version data entries

5 entries across 5 versions & 1 rubygems

Version Path
fozzie-0.0.5 spec/lib/fozzie/config_spec.rb
fozzie-0.0.4 spec/lib/fozzie/config_spec.rb
fozzie-0.0.3 spec/lib/fozzie/config_spec.rb
fozzie-0.0.2 spec/lib/fozzie/config_spec.rb
fozzie-0.0.1 spec/lib/fozzie/config_spec.rb