spec/smoke_spec.rb in benschwarz-smoke-0.3.6 vs spec/smoke_spec.rb in benschwarz-smoke-0.3.7
- old
+ new
@@ -15,6 +15,33 @@
Smoke.rename(:a => :b)
Smoke[:a].should be_nil
Smoke[:b].should be_an_instance_of(Smoke::Origin)
end
end
+
+ describe "configuration" do
+ it "should be configurable" do
+ Smoke.should respond_to(:configure)
+ end
+
+ it "should be accessible" do
+ Smoke.should respond_to(:config)
+ end
+
+ it "should take a block and be retrievable" do
+ Smoke.configure {|c| c[:spec] = true }
+ Smoke.config[:spec].should be_true
+ end
+
+ describe "default configurations" do
+ it "should have at least one default configuration" do
+ Smoke.config.keys.should_not be_empty
+ end
+
+ it "should allow overwriting default configurations" do
+ key = Smoke.config.keys.first
+ Smoke.configure {|c| c[key] = true }
+ Smoke.config[key].should be_true
+ end
+ end
+ end
end
\ No newline at end of file