Permalink
Browse files

[^] footnotes_spec HTML const name conflict has been resolved

  • Loading branch information...
romanvbabenko committed Apr 15, 2012
1 parent 4488f20 commit 53d649e48e00ae9731b50c634710ea0bd0fb496c
Showing with 7 additions and 9 deletions.
  1. +0 −2 Gemfile.lock
  2. +7 −7 spec/footnotes_spec.rb
View
@@ -94,7 +94,6 @@ GEM
polyglot
polyglot (>= 0.3.1)
tzinfo (0.3.30)
- watchr (0.7)
PLATFORMS
ruby
@@ -103,4 +102,3 @@ DEPENDENCIES
rails (>= 3.0.0)
rails-footnotes!
rspec (~> 2.9.0)
- watchr
View
@@ -23,7 +23,7 @@ class NoteZNote < TestNote; end
@controller.template = Object.new
@controller.request = ActionController::TestRequest.new
@controller.response = ActionController::TestResponse.new
- @controller.response_body = HTML.dup
+ @controller.response_body = HTML_DOCUMENT.dup
@controller.params = {}
Footnotes::Filter.notes = [ :test ]
@@ -40,32 +40,32 @@ class NoteZNote < TestNote; end
if RUBY_VERSION >= '1.9.0'
it "foonotes_included" do
footnotes_perform!
- @controller.response_body.should_not == HTML
+ @controller.response_body.should_not == HTML_DOCUMENT
end
end
specify "footnotes_not_included_when_request_is_xhr" do
@controller.request.env['HTTP_X_REQUESTED_WITH'] = 'XMLHttpRequest'
@controller.request.env['HTTP_ACCEPT'] = 'text/javascript, text/html, application/xml, text/xml, */*'
footnotes_perform!
- @controller.response.body.should eql HTML
+ @controller.response.body.should eql HTML_DOCUMENT
end
specify "footnotes_not_included_when_content_type_is_javascript" do
@controller.response.headers['Content-Type'] = 'text/javascript'
footnotes_perform!
- @controller.response.body.should eql HTML
+ @controller.response.body.should eql HTML_DOCUMENT
end
specify "footnotes_included_when_content_type_is_html" do
@controller.response.headers['Content-Type'] = 'text/html'
footnotes_perform!
- @controller.response.body.should_not eql HTML
+ @controller.response.body.should_not eql HTML_DOCUMENT
end
specify "footnotes_included_when_content_type_is_nil" do
footnotes_perform!
- @controller.response.body.should_not eql HTML
+ @controller.response.body.should_not eql HTML_DOCUMENT
end
specify "not_included_when_body_is_not_a_string" do
@@ -198,7 +198,7 @@ def template_expects(format)
end
end
-HTML = <<EOF
+HTML_DOCUMENT = <<EOF
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN">
<html>
<head>

0 comments on commit 53d649e

Please sign in to comment.