Sha256: eaa804d3c4f555cc88f4080274d3040aa73ef5674b153f0c2e95e31eff302122
Contents?: true
Size: 1.03 KB
Versions: 1
Compression:
Stored size: 1.03 KB
Contents
require 'spec_helper' describe Viking do it { should respond_to :logger } it { should respond_to :default_engine } it { should respond_to :connect_options } it { should respond_to :default_instance } describe ".connect" do it "should load the Defensio engine" do Viking.connect('defensio', {}).should be_a_kind_of(Viking::Defensio) end it "should load the Akismet engine" do Viking.connect('akismet', {}).should be_a_kind_of(Viking::Akismet) end it "should be nil if the engine is nil" do Viking.connect(nil, {}).should be_nil end it "should be nil if the engine is blank" do Viking.connect('', {}).should be_nil end end describe ".enabled?" do it "should not be enabled if a default instance has not be initialized" do Viking.should_not be_enabled end it "should be enabled if a default instance has been initialized" do Viking.default_engine = 'defensio' Viking.connect_options = '1234abc' Viking.should be_enabled end end end
Version data entries
1 entries across 1 versions & 1 rubygems
Version | Path |
---|---|
viking-1.0.0 | spec/viking/viking_spec.rb |