Sha256: 6b5f9a7a30e104b105e23c80233302496f6876829dd4e9d12d25a53e8363ffd2

Contents?: true

Size: 478 Bytes

Versions: 10

Compression:

Stored size: 478 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

10 entries across 10 versions & 1 rubygems

Version Path
fozzie-0.0.15 spec/lib/fozzie/config_spec.rb
fozzie-0.0.14 spec/lib/fozzie/config_spec.rb
fozzie-0.0.13 spec/lib/fozzie/config_spec.rb
fozzie-0.0.12 spec/lib/fozzie/config_spec.rb
fozzie-0.0.11 spec/lib/fozzie/config_spec.rb
fozzie-0.0.10 spec/lib/fozzie/config_spec.rb
fozzie-0.0.9 spec/lib/fozzie/config_spec.rb
fozzie-0.0.8 spec/lib/fozzie/config_spec.rb
fozzie-0.0.7 spec/lib/fozzie/config_spec.rb
fozzie-0.0.6 spec/lib/fozzie/config_spec.rb