Permalink
Browse files

fix references helper errors with test filters

  • Loading branch information...
1 parent 649b597 commit 862024baeb437ed9b51ce104ae4f4e8de9f69029 @saturnflyer saturnflyer committed Mar 5, 2012
Showing with 3 additions and 2 deletions.
  1. +3 −2 spec/helpers/admin/references_helper_spec.rb
@@ -1,4 +1,4 @@
-require File.dirname(__FILE__) + '/../../spec_helper'
+require 'spec_helper'
describe Admin::ReferencesHelper do
class BasicFilter < TextFilter; end
@@ -91,7 +91,7 @@ class CustomFilter < TextFilter
before :each do
helper.send(:instance_variable_set, :@filter, nil)
params[:type] = 'filters'
- params[:filter_name] = 'Textile'
+ params[:filter_name] = 'Basic'
end
it "should render a helpful message when the description is blank" do
@@ -100,6 +100,7 @@ class CustomFilter < TextFilter
end
it "should render the filter's description when available" do
+ BasicFilter.should_receive(:description).at_least(:once).and_return('This is basic stuff.')
helper.filter_reference.should == BasicFilter.description
end

0 comments on commit 862024b

Please sign in to comment.