Sha256: caae8e338d9c6fcbd0a060bea65d61018add83ce8cbdae7923cab8d1f4121671
Contents?: true
Size: 660 Bytes
Versions: 11
Compression:
Stored size: 660 Bytes
Contents
require 'spec_helper' describe SimpleAdmin::Breadcrumbs do it "parses the path" do SimpleAdmin::Breadcrumbs.parse("/admin/things", "index").should == [["Admin", "/admin"]] end it "includes the last step if creating" do SimpleAdmin::Breadcrumbs.parse("/admin/things", "create").should == [["Admin", "/admin"], ["Things", "/admin/things"]] end it "finds the object and uses the display name" do @thing = Factory(:thing) Thing.any_instance.expects(:display_name).returns("A Thing!") SimpleAdmin::Breadcrumbs.parse("/things/#{@thing.id}", "create").should == [["Things", "/things"],["A Thing!", "/things/#{@thing.id}"]] end end
Version data entries
11 entries across 11 versions & 1 rubygems