Sha256: 4976bcc2b91dea3d0a97360b3107ba492907e438637c2bcf36159a7c35ffc1ad
Contents?: true
Size: 1.5 KB
Versions: 6
Compression:
Stored size: 1.5 KB
Contents
require 'spec_helper' describe Navigasmic do it "has a configuration property" do Navigasmic.configuration.should be(Navigasmic::Configuration) end describe ".setup" do it "is defined" do Navigasmic.methods.should include(:setup) end it "yields configuration" do config = nil Navigasmic.setup { |c| config = c } config.should be(Navigasmic::Configuration) end end describe Navigasmic::Configuration do subject { Navigasmic::Configuration } it "sets the default_builder to ListBuilder" do subject.default_builder.should be(Navigasmic::Builder::ListBuilder) end it "allows configuring builders" do subject.builder_configurations.should be_a(Hash) subject.builder_configurations.should include('Navigasmic::Builder::ListBuilder') subject.builder test_config: Navigasmic::Builder::ListBuilder do end subject.builder_configurations['Navigasmic::Builder::ListBuilder'].should include(:test_config) subject.builder_configurations['Navigasmic::Builder::ListBuilder'][:test_config].should be_a(Proc) end it "allows naming builder configurations" do end it "allows defining navigation structures" do subject.definitions.should be_a(Hash) subject.definitions.should include(:primary) subject.semantic_navigation :test_definition do end subject.definitions.should include(:test_definition) subject.definitions[:test_definition].should be_a(Proc) end end end
Version data entries
6 entries across 6 versions & 1 rubygems