Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with
or
.
Download ZIP
Browse files

[^] spec warning has been eliminated

  • Loading branch information...
commit 1a851fa31da0def06ac7c876b13d28cec3f40eeb 1 parent 53d649e
@romanvbabenko romanvbabenko authored
Showing with 5 additions and 5 deletions.
  1. +2 −3 lib/rails-footnotes/filter.rb
  2. +3 −2 spec/footnotes_spec.rb
View
5 lib/rails-footnotes/filter.rb
@@ -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!
View
5 spec/footnotes_spec.rb
@@ -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
Please sign in to comment.
Something went wrong with that request. Please try again.