Navigation Menu

Skip to content

Commit

Permalink
Added spec to ensure that subsequent calls will return the same result.
Browse files Browse the repository at this point in the history
  • Loading branch information
roidrage committed Aug 28, 2009
1 parent 05c2953 commit de4d050
Showing 1 changed file with 12 additions and 0 deletions.
12 changes: 12 additions & 0 deletions spec/breadcrumbs_helper_spec.rb
Expand Up @@ -240,6 +240,18 @@ def controller
crumbs.should == %Q{<a href="http://test.host/search/jonathan">Search Results</a>}
end

it "return the same breadcrumbs on subsequent calls" do
Breadcrumb.configure do
crumb :your_account, "Your Account", :edit_account_url
trail :accounts, :index, [:your_account]
end
params[:controller] = 'accounts'
params[:action] = 'index'
once = crumbs
twice = crumbs
once.should == twice
end

describe "when fetching parameters" do
it "should support nested parameter attributes" do
Breadcrumb.configure do
Expand Down

0 comments on commit de4d050

Please sign in to comment.