Skip to content

Commit

Permalink
[^] spec warning has been eliminated
Browse files Browse the repository at this point in the history
  • Loading branch information
nordringrayhide committed Apr 15, 2012
1 parent 53d649e commit 1a851fa
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 5 deletions.
5 changes: 2 additions & 3 deletions lib/rails-footnotes/filter.rb
Expand Up @@ -74,9 +74,8 @@ def close!(controller)

protected
def valid?
performed_render? && valid_format? && valid_content_type? &&
@body.is_a?(String) && !component_request? && !xhr? &&
!footnotes_disabled?
@body.is_a?(String) && performed_render? && valid_format? && valid_content_type? &&
!component_request? && !xhr? && !footnotes_disabled?
end

def add_footnotes_without_validation!
Expand Down
5 changes: 3 additions & 2 deletions spec/footnotes_spec.rb
Expand Up @@ -69,8 +69,9 @@ class NoteZNote < TestNote; end
end

specify "not_included_when_body_is_not_a_string" do
@controller.response.body = Proc.new { Time.now }
expect { footnotes_perform! }.should_not raise_exception
@controller.response.stub(:body).and_return(Time.now)# = Proc.new { Time.now }
Footnotes::Filter.new(@controller).send(:valid?).should_not be
@controller.response.body.should_not =~ /<!-- Footnotes/
end

specify "notes_are_initialized" do
Expand Down

0 comments on commit 1a851fa

Please sign in to comment.