Sha256: c156c49ae7f047cfefd79559dfe068574cb74ea71d969f04123e310df63fd861
Contents?: true
Size: 1.16 KB
Versions: 1
Compression:
Stored size: 1.16 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 load the Akismet engine with Symbol" 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.1 | spec/viking/viking_spec.rb |