Skip to content

Commit

Permalink
Change specs to use new config.
Browse files Browse the repository at this point in the history
  • Loading branch information
piotrmurach committed Jan 10, 2015
1 parent b6044d8 commit 8f8ed03
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 4 deletions.
3 changes: 1 addition & 2 deletions spec/unit/controller_extensions_spec.rb
Original file line number Diff line number Diff line change
Expand Up @@ -2,8 +2,7 @@

require 'spec_helper'

class DummyController
def self.helper_method(*args); end
class DummyController < ActionController::Base
def self.before_filter(options, &block)
yield self.new
end
Expand Down
4 changes: 2 additions & 2 deletions spec/unit/view_extensions/breadcrumbs_spec.rb
Original file line number Diff line number Diff line change
Expand Up @@ -93,7 +93,7 @@
end

it 'uses global configuration for crumb formatting' do
allow(Loaf).to receive(:crumb_length).and_return(10)
allow(Loaf.configuration).to receive(:crumb_length).and_return(10)
instance = DummyView.new
instance.breadcrumb('home-sweet-home', :home_path)
instance.breadcrumb('posts-for-everybody', :posts_path)
Expand All @@ -110,7 +110,7 @@
end

it "allows to overwrite global configuration" do
allow(Loaf).to receive(:crumb_length).and_return(10)
allow(Loaf.configuration).to receive(:crumb_length).and_return(10)
instance = DummyView.new
instance.breadcrumb('home-sweet-home', :home_path)
instance.breadcrumb('posts-for-everybody', :posts_path)
Expand Down

0 comments on commit 8f8ed03

Please sign in to comment.