fozzie 0.0.15 → 0.0.16

Sign up to get free protection for your applications and to get access to all the features.
data/lib/fozzie/config.rb DELETED
@@ -1,19 +0,0 @@
1
- require "fozzie/configuration"
2
-
3
- module Fozzie
4
- module Config
5
-
6
- def c
7
- config
8
- end
9
-
10
- def config(&block)
11
- @config ||= Configuration.new
12
- end
13
-
14
- def configure(&block)
15
- yield c if block_given?
16
- end
17
-
18
- end
19
- end
@@ -1,24 +0,0 @@
1
- require 'spec_helper'
2
-
3
- describe Fozzie::Config do
4
-
5
- subject do
6
- F = Class.new { extend Fozzie::Config } unless defined?(F)
7
- F
8
- end
9
-
10
- it { should respond_to(:configure) }
11
- it { should respond_to(:config) }
12
- it { should respond_to(:c) }
13
-
14
- it "allows dynamic assignment" do
15
- {
16
- :host => 'somewhere.local',
17
- :port => 99
18
- }.each do |field, val|
19
- F.configure {|c| c.send("#{field}=", val) }
20
- F.c.send(field).should == val
21
- end
22
- end
23
-
24
- end