Sha256: 5b1e5eae061c64239b6a1da616bd419bf27a491c7f251b39a7a4a3847463681e
Contents?: true
Size: 1.09 KB
Versions: 5
Compression:
Stored size: 1.09 KB
Contents
# To change this template, choose Tools | Templates # and open the template in the editor. require File.expand_path(File.dirname(__FILE__) + '/spec_helper') describe Lolita::Mapping do it "should store options" do mapping=Lolita::Mapping.new(:posts) mapping.to.should == Post mapping.plural.should == :posts mapping.singular.should == :post mapping.path.should == "lolita" mapping.controllers[:posts].should == "lolita/posts" end context "url_name" do it "should start with lolita when no path is given" do mapping=Lolita::Mapping.new(:posts) mapping.url_name.should=="lolita_posts" end it "should start with given path" do mapping=Lolita::Mapping.new(:posts,:path=>"my_admin") mapping.url_name.should == "my_admin_posts" end end it 'should add headless navigation items to tree' do tree = Lolita::Navigation::Tree.new(:"left_side_navigation") Lolita::Navigation::Tree.remember(tree) described_class.new(:dashboard).add_to_navigation_tree described_class.new(:data_import).add_to_navigation_tree expect(Lolita.navigation.branches.size).to eq(2) end end
Version data entries
5 entries across 5 versions & 1 rubygems
Version | Path |
---|---|
lolita-4.0.11 | spec/mapping_spec.rb |
lolita-4.0.10 | spec/mapping_spec.rb |
lolita-4.0.9 | spec/mapping_spec.rb |
lolita-4.0.8 | spec/mapping_spec.rb |
lolita-4.0.7 | spec/mapping_spec.rb |