Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with
or
.
Download ZIP
Browse files

Merge branch 'html5-pre-rails-3' of https://github.com/gaelian/enki i…

…nto html5

Conflicts:
	app/helpers/application_helper.rb
	app/views/admin/comments/show.html.erb
	app/views/admin/dashboard/show.html.erb
	app/views/admin/pages/_page.html.erb
	app/views/admin/pages/new.html.erb
	app/views/admin/pages/show.html.erb
	app/views/admin/posts/_post.html.erb
	app/views/admin/posts/new.html.erb
	app/views/admin/posts/show.html.erb
	app/views/layouts/admin.html.erb
	app/views/layouts/application.html.erb
	config/environment.rb
	public/404.html
	public/422.html
	public/500.html
	spec/be_valid_html5.rb
	spec/be_valid_xhtml.rb
	spec/spec_helper.rb
	spec/support/be_valid_xhtml.rb
	spec/views/admin/comments/index.html.erb_spec.rb
	spec/views/admin/comments/show.html.erb_spec.rb
	spec/views/admin/dashboard/show.html.erb_spec.rb
	spec/views/admin/pages/index.html.erb_spec.rb
	spec/views/admin/pages/new.html.erb_spec.rb
	spec/views/admin/pages/show.html.erb_spec.rb
	spec/views/admin/posts/index.html.erb_spec.rb
	spec/views/admin/posts/new.html.erb_spec.rb
	spec/views/admin/posts/show.html.erb_spec.rb
	spec/views/admin/sessions/new.html.erb_spec.rb
	spec/views/admin/undo_items/index.html.erb_spec.rb
	spec/views/archives/index.html.erb_spec.rb
	spec/views/pages/show.html.erb_spec.rb
	spec/views/posts/index.html.erb_spec.rb
	spec/views/posts/show.html.erb_spec.rb
  • Loading branch information...
commit 8f2fd0d4b942fc17fbed479a686fb0cc9973a2bc 2 parents ac3d3ad + 5170411
@xaviershay authored
Showing with 215 additions and 59 deletions.
  1. +1 −1  app/controllers/application_controller.rb
  2. +2 −2 app/helpers/application_helper.rb
  3. +1 −1  app/views/admin/comments/index.html.erb
  4. +1 −1  app/views/admin/dashboard/show.html.erb
  5. +1 −1  app/views/admin/health/index.html.erb
  6. +1 −0  app/views/admin/pages/_page.html.erb
  7. +1 −1  app/views/admin/pages/index.html.erb
  8. +1 −0  app/views/admin/posts/_post.html.erb
  9. +1 −1  app/views/admin/posts/index.html.erb
  10. +1 −1  app/views/admin/tags/index.html.erb
  11. +6 −4 app/views/admin/undo_items/index.html.erb
  12. +1 −1  app/views/comments/_comment.html.erb
  13. +5 −9 app/views/layouts/admin.html.erb
  14. +6 −10 app/views/layouts/application.html.erb
  15. +3 −7 app/views/layouts/login.html.erb
  16. +1 −1  app/views/posts/show.html.erb
  17. +1 −0  config/initializers/enki_ext.rb
  18. +8 −0 lib/enki/html5_tags.rb
  19. +2 −1  public/404.html
  20. +2 −1  public/422.html
  21. +2 −1  public/500.html
  22. +2 −0  public/stylesheets/admin.css
  23. +150 −0 spec/support/be_valid_html5.rb
  24. +1 −1  spec/views/admin/comments/index.html.erb_spec.rb
  25. +1 −1  spec/views/admin/comments/show.html.erb_spec.rb
  26. +1 −1  spec/views/admin/dashboard/show.html.erb_spec.rb
  27. +1 −1  spec/views/admin/pages/index.html.erb_spec.rb
  28. +1 −1  spec/views/admin/pages/new.html.erb_spec.rb
  29. +1 −1  spec/views/admin/pages/show.html.erb_spec.rb
  30. +1 −1  spec/views/admin/posts/index.html.erb_spec.rb
  31. +1 −1  spec/views/admin/posts/new.html.erb_spec.rb
  32. +1 −1  spec/views/admin/posts/show.html.erb_spec.rb
  33. +1 −1  spec/views/admin/sessions/new.html.erb_spec.rb
  34. +1 −1  spec/views/admin/undo_items/index.html.erb_spec.rb
  35. +1 −1  spec/views/archives/index.html.erb_spec.rb
  36. +1 −1  spec/views/pages/show.html.erb_spec.rb
  37. +1 −1  spec/views/posts/index.html.erb_spec.rb
  38. +1 −1  spec/views/posts/show.html.erb_spec.rb
View
2  app/controllers/application_controller.rb
@@ -5,7 +5,7 @@ class ApplicationController < ActionController::Base
protected
def set_content_type
- headers['Content-Type'] ||= 'application/xhtml+xml; charset=utf-8'
+ headers['Content-Type'] ||= 'text/html; charset=utf-8'
end
def enki_config
View
4 app/helpers/application_helper.rb
@@ -5,8 +5,8 @@ def author
def open_id_delegation_link_tags(server, delegate)
raw links = <<-EOS
- <link rel="openid.server" href="#{server}" />
- <link rel="openid.delegate" href="#{delegate}" />
+ <link rel="openid.server" href="#{server}">
+ <link rel="openid.delegate" href="#{delegate}">
EOS
end
View
2  app/views/admin/comments/index.html.erb
@@ -4,7 +4,7 @@
<% end -%>
<h1>Comments</h1>
-<table cellspacing="0" cellpadding="0">
+<table>
<thead>
<tr>
<th>Created At</th>
View
2  app/views/admin/dashboard/show.html.erb
@@ -42,7 +42,7 @@
<div class='comment-actions'>
<%= link_to(image_tag('silk/pencil.png', :alt => 'edit'), admin_comment_path(comment)) %>
<%= form_for(comment, :as => :comment, :url => admin_comment_path(comment), :html => {:class => 'delete-item', :id => "delete-comment-#{comment.id}", :method => :delete}) do |form| -%>
- <%= image_submit_tag("silk/delete.png") %>
+ <%= image_submit_tag("silk/delete.png", :alt => 'Delete Comment') %>
<% end -%>
</div>
<%= comment.body_html %>
View
2  app/views/admin/health/index.html.erb
@@ -1,3 +1,3 @@
<h1>Health</h1>
-<p><%= button_to("Throw exception", admin_health_path(:action => 'generate_exception')) %></p>
+<%= button_to("Throw exception", admin_health_path(:action => 'generate_exception')) %>
View
1  app/views/admin/pages/_page.html.erb
@@ -7,6 +7,7 @@
<%= link_to(image_tag('silk/pencil.png', :alt => 'edit'), admin_page_path(page)) %>
<%= form_for(page, :as => :page, :url => admin_page_path(page), :html => {:class => 'delete-item', :method => :delete}) do |form| -%>
<%= image_submit_tag("silk/delete.png") %>
+ <%= image_submit_tag("silk/delete.png", :alt => 'Delete Comment') %>
<% end -%>
</td>
</tr>
View
2  app/views/admin/pages/index.html.erb
@@ -4,7 +4,7 @@
<h1>Your pages</h1>
-<table cellspacing="0" cellpadding="0">
+<table>
<thead>
<tr>
<th>Created At</th>
View
1  app/views/admin/posts/_post.html.erb
@@ -7,6 +7,7 @@
<%= link_to(image_tag('silk/pencil.png', :alt => 'edit'), admin_post_path(post)) %>
<%= form_for(post, :as => :post, :url => admin_post_path(post), :html => {:class => 'delete-item', :method => :delete}) do |form| -%>
<%= image_submit_tag("silk/delete.png") %>
+ <%= image_submit_tag("silk/delete.png", :alt => 'Delete Comment') %>
<% end -%>
</td>
</tr>
View
2  app/views/admin/posts/index.html.erb
@@ -3,7 +3,7 @@
<% end -%>
<h1>Your posts</h1>
-<table cellspacing="0" cellpadding="0">
+<table>
<thead>
<tr>
<th>Published At</th>
View
2  app/views/admin/tags/index.html.erb
@@ -1,6 +1,6 @@
<h1>Your tags</h1>
-<table cellspacing="0" cellpadding="0">
+<table>
<thead>
<tr>
<th>Name</th>
View
10 app/views/admin/undo_items/index.html.erb
@@ -3,11 +3,13 @@
<% end -%>
<h1>Recent actions</h1>
-<table cellspacing="0" cellpadding="0">
+<table>
<thead>
- <th>Date</th>
- <th>Action</th>
- <th></th>
+ <tr>
+ <th>Date</th>
+ <th>Description</th>
+ <th>Action</th>
+ </tr>
</thead>
<tbody>
View
2  app/views/comments/_comment.html.erb
@@ -1,4 +1,4 @@
<cite><%= author_link(comment) %></cite> says:
- <br />
+ <br>
<small class="commentmetadata"><a href="#comment-<%= comment.id %>" title=""><%= format_comment_date(comment.created_at) %></a></small>
<p><%=raw comment.body_html %></p>
View
14 app/views/layouts/admin.html.erb
@@ -1,11 +1,7 @@
-<?xml version="1.0" encoding="UTF-8"?>
-<!DOCTYPE html PUBLIC
- "-//W3C//DTD XHTML 1.1 plus MathML 2.0 plus SVG 1.1//EN"
- "http://www.w3.org/2002/04/xhtml-math-svg/xhtml-math-svg-flat.dtd">
-
-<html xmlns="http://www.w3.org/1999/xhtml" xml:lang="en">
+<!DOCTYPE html>
+<html dir="ltr" lang="en-US">
<head>
- <meta http-equiv="Content-Type" content="application/xhtml+xml; charset=utf-8"/>
+ <meta charset="utf-8">
<title><%= enki_config[:title] %> - Admin</title>
@@ -39,8 +35,8 @@
<div id="nav">
<ul>
<li><%= nav_link_to("Dashboard", admin_root_path, :accesskey => '1') %></li>
- <li><%= nav_link_to("Posts", admin_posts_path, :accesskey => '2') %> <%= nav_link_to("(+)", new_admin_post_path, :access_key => 'n') %></li>
- <li><%= nav_link_to("Pages", admin_pages_path, :accesskey => '3') %> <%= nav_link_to("(+)", new_admin_page_path, :access_key => 'p') %></li>
+ <li><%= nav_link_to("Posts", admin_posts_path, :accesskey => '2') %> <%= nav_link_to("(+)", new_admin_post_path, :accesskey => 'n') %></li>
+ <li><%= nav_link_to("Pages", admin_pages_path, :accesskey => '3') %> <%= nav_link_to("(+)", new_admin_page_path, :accesskey => 'p') %></li>
<li><%= nav_link_to("Comments", admin_comments_path, :accesskey => '4') %></li>
<li><%= nav_link_to("Tags", admin_tags_path, :accesskey => '5') %></li>
<li><%= nav_link_to("Actions", admin_undo_items_path, :accesskey => '6') %></li>
View
16 app/views/layouts/application.html.erb
@@ -1,11 +1,7 @@
-<?xml version="1.0" encoding="UTF-8"?>
-<!DOCTYPE html PUBLIC
- "-//W3C//DTD XHTML 1.1 plus MathML 2.0 plus SVG 1.1//EN"
- "http://www.w3.org/2002/04/xhtml-math-svg/xhtml-math-svg-flat.dtd">
-
-<html xmlns="http://www.w3.org/1999/xhtml" xml:lang="en">
+<!DOCTYPE html>
+<html dir="ltr" lang="en-US">
<head>
- <meta http-equiv="Content-Type" content="application/xhtml+xml; charset=utf-8"/>
+ <meta charset="utf-8">
<title><%= yield(:page_title) || enki_config[:title] %></title>
<%= stylesheet_link_tag 'application' %>
<%= javascript_include_tag 'jquery' %>
@@ -39,13 +35,13 @@
<div>
<h2><label for="q">Search</label></h2>
- <input type="text" id="q" value="" name="q" />
- <input type="hidden" name="sitesearch" value="<%= enki_config[:url] %>" />
+ <input type="text" id="q" value="" name="q">
+ <input type="hidden" name="sitesearch" value="<%= enki_config[:url] %>">
</div>
</form>
</div>
- <div id="footer"><%= enki_config[:title] %> &#169; <%= enki_config[:author, :name] %>. Valid <a href="http://validator.w3.org/check?uri=referer">XHTML</a> and <%= link_to "ATOM", "http://feedvalidator.org/check.cgi?url=#{enki_config[:url]}/posts.atom" %>. Powered by <a href="http://www.enkiblog.com" title="A Ruby on Rails blogging app for the fashionable developer">Enki</a>.</div>
+ <div id="footer"><%= enki_config[:title] %> &#169; <%= enki_config[:author, :name] %>. Valid <a href="http://validator.w3.org/check?uri=referer">HTML5</a> and <%= link_to "ATOM", "http://feedvalidator.org/check.cgi?url=#{enki_config[:url]}/posts.atom" %>. Powered by <a href="http://www.enkiblog.com" title="A Ruby on Rails blogging app for the fashionable developer">Enki</a>.</div>
</div>
</body>
</html>
View
10 app/views/layouts/login.html.erb
@@ -1,11 +1,7 @@
-<?xml version="1.0" encoding="UTF-8"?>
-<!DOCTYPE html PUBLIC
- "-//W3C//DTD XHTML 1.1 plus MathML 2.0 plus SVG 1.1//EN"
- "http://www.w3.org/2002/04/xhtml-math-svg/xhtml-math-svg-flat.dtd">
-
-<html xmlns="http://www.w3.org/1999/xhtml" xml:lang="en">
+<!DOCTYPE html>
+<html dir="ltr" lang="en-US">
<head>
- <meta http-equiv="Content-Type" content="application/xhtml+xml; charset=utf-8"/>
+ <meta charset="utf-8">
<title><%= enki_config[:title] %> - Admin Login</title>
View
2  app/views/posts/show.html.erb
@@ -28,7 +28,7 @@
<%= form_for([@post, @comment]) do |form| -%>
<div>
<p><%= form.text_field 'author' %><label for="comment_author"><small>Name or <a href="http://openidexplained.com/">OpenID</a> (required)</small></label></p>
- <p><%= form.text_area 'body' %><br /><small>(<a href="http://lesstile.rubyforge.org">lesstile enabled</a> - surround code blocks with ---)</small></p>
+ <p><%= form.text_area 'body' %><br><small>(<a href="http://lesstile.rubyforge.org">lesstile enabled</a> - surround code blocks with ---)</small></p>
<p><%= submit_tag "Add Comment" %></p>
</div>
<% end -%>
View
1  config/initializers/enki_ext.rb
@@ -1,2 +1,3 @@
require 'core_extensions/string'
require 'core_extensions/object'
+require 'enki/html5_tags'
View
8 lib/enki/html5_tags.rb
@@ -0,0 +1,8 @@
+# TagHelper will output HTML tags as opposed to self-closed XHTML tags.
+# Shouldn't be needed for Rails >= version 3.
+module ActionView::Helpers::TagHelper
+ def tag_with_html_patch(name, options = nil, open = true, escape = true)
+ tag_without_html_patch(name, options, true, escape)
+ end
+ alias_method_chain :tag, :html_patch
+end
View
3  public/404.html
@@ -1,6 +1,7 @@
<!DOCTYPE html>
-<html>
+<html dir="ltr" lang="en-US">
<head>
+ <meta charset="utf-8">
<title>The page you were looking for doesn't exist (404)</title>
<style type="text/css">
body { background-color: #fff; color: #666; text-align: center; font-family: arial, sans-serif; }
View
3  public/422.html
@@ -1,6 +1,7 @@
<!DOCTYPE html>
-<html>
+<html dir="ltr" lang="en-US">
<head>
+ <meta charset="utf-8">
<title>The change you wanted was rejected (422)</title>
<style type="text/css">
body { background-color: #fff; color: #666; text-align: center; font-family: arial, sans-serif; }
View
3  public/500.html
@@ -1,6 +1,7 @@
<!DOCTYPE html>
-<html>
+<html dir="ltr" lang="en-US">
<head>
+ <meta charset="utf-8">
<title>We're sorry, but something went wrong (500)</title>
<style type="text/css">
body { background-color: #fff; color: #666; text-align: center; font-family: arial, sans-serif; }
View
2  public/stylesheets/admin.css
@@ -219,6 +219,8 @@ table {
color: #222222;
background-color: #ececec;
margin-bottom: 20px;
+ border-collapse: collapse;
+ padding: 0;
}
table td {
View
150 spec/support/be_valid_html5.rb
@@ -0,0 +1,150 @@
+# Paste me into spec_helper.rb, or save me somewhere else and require me in.
+require 'net/http'
+require 'digest/md5'
+require 'hpricot'
+
+class BeValidHtml5
+
+ def initialize(options)
+ @fragment = options[:fragment]
+ end
+
+ # Assert that markup is valid according the W3C validator web service.
+ # By default, it validates the contents of @response.body, which is set after calling
+ # one of the get/post/etc helper methods. You can also pass it a string to be validated.
+ # Validation errors, if any, will be included in the output. The input fragment and
+ # response from the validator service will be cached in the $RAILS_ROOT/tmp directory to
+ # minimize network calls.
+ #
+ # For example, if you have a FooController with an action Bar, put this in foo_controller_test.rb:
+ #
+ # def test_bar_valid_markup
+ # get :bar
+ # assert_valid_markup
+ # end
+ #
+ MARKUP_VALIDATOR_HOST = ENV['MARKUP_VALIDATOR_HOST'] || 'validator.w3.org'
+ MARKUP_VALIDATOR_PATH = ENV['MARKUP_VALIDATOR_PATH'] || '/check'
+ CSS_VALIDATOR_HOST = ENV['CSS_VALIDATOR_HOST'] || 'jigsaw.w3.org'
+ CSS_VALIDATOR_PATH = ENV['CSS_VALIDATOR_PATH'] || '/css-validator/validator'
+
+ @@display_invalid_content = false
+ cattr_accessor :display_invalid_content
+
+ @@auto_validate = false
+ cattr_accessor :auto_validate
+
+ class_inheritable_accessor :auto_validate_excludes
+ class_inheritable_accessor :auto_validate_includes
+
+
+ def matches?(response)
+ fn = response.rendered[:template].template_path
+ fragment = response.body
+ fragment = wrap_with_html5_header(fragment) if @fragment
+ return true if validity_checks_disabled?
+ base_filename = cache_resource('markup',fragment,fn)
+
+ return false unless base_filename
+ results_filename = base_filename + '-results.yml'
+
+ begin
+ response = File.open(results_filename) do |f| Marshal.load(f) end
+ rescue
+ response = http.start(MARKUP_VALIDATOR_HOST).post2(MARKUP_VALIDATOR_PATH, "fragment=#{CGI.escape(fragment)}&output=xml")
+ File.open(results_filename, 'w+') do |f| Marshal.dump(response, f) end
+ end
+ markup_is_valid = response['x-w3c-validator-status'] == 'Valid'
+ unless markup_is_valid
+ fragment.split($/).each_with_index{|line, index| message << "#{'%04i' % (index+1)} : #{line}#{$/}"} if @@display_invalid_content
+ @message = "Invalid markup:\n"
+ @elements = Hpricot.XML(response.body).search("li.msg_err > span.msg")
+ (@elements).each { |span| @message << CGI.unescapeHTML(span.inner_html) + "\n" }
+ end
+ if markup_is_valid
+ return true
+ else
+ return false
+ end
+ end
+
+ def wrap_with_html5_header(fragment)
+ ret = <<-EOS
+<!DOCTYPE html>
+<html dir="ltr" lang="en-US">
+<head>
+ <meta charset="utf-8">
+ <title>Test</title>
+</head>
+<body>
+ #{fragment}
+</body>
+</html>
+ EOS
+ end
+
+ def description
+ "be valid html5"
+ end
+
+ def failure_message
+ " expected html5 to be valid, but validation produced these errors:\n #{@message}"
+ end
+
+ def negative_failure_message
+ " expected to not be valid, but was (missing validation?)"
+ end
+
+ private
+ def validity_checks_disabled?
+ ENV["NET"] != 'true'
+ end
+
+ def text_to_multipart(key,value)
+ return "Content-Disposition: form-data; name=\"#{CGI::escape(key)}\"\r\n\r\n#{value}\r\n"
+ end
+
+ def file_to_multipart(key,filename,mime_type,content)
+ return "Content-Disposition: form-data; name=\"#{CGI::escape(key)}\"; filename=\"#{filename}\"\r\n" +
+ "Content-Transfer-Encoding: binary\r\nContent-Type: #{mime_type}\r\n\r\n#{content}\r\n"
+ end
+
+ def cache_resource(base,resource,fn)
+ resource_md5 = Digest::MD5.hexdigest(resource).to_s
+ file_md5 = nil
+
+ output_dir = "#{RAILS_ROOT}/tmp/#{base}"
+ base_filename = File.join(output_dir, fn)
+ filename = base_filename
+
+ parent_dir = File.dirname(filename)
+ FileUtils.mkdir_p(parent_dir) unless File.exists?(parent_dir)
+
+ File.open(filename, 'r') do |f|
+ file_md5 = Digest::MD5.hexdigest(f.read(f.stat.size)).to_s
+ end if File.exists?(filename)
+
+ if file_md5 != resource_md5
+ Dir["#{base_filename}[^.]*"] .each {|f| File.delete(f)}
+ File.open(filename, 'w+') do |f| f.write(resource); end
+ end
+ base_filename
+ end
+
+ def http
+ if Module.constants.include?("ApplicationConfig") && ApplicationConfig.respond_to?(:proxy_config)
+ Net::HTTP::Proxy(ApplicationConfig.proxy_config['host'], ApplicationConfig.proxy_config['port'])
+ else
+ Net::HTTP
+ end
+ end
+
+end
+
+def be_valid_html5
+ BeValidhtml5.new
+end
+
+def be_valid_html5_fragment
+ BeValidHtml5.new(:fragment => true)
+end
View
2  spec/views/admin/comments/index.html.erb_spec.rb
@@ -2,7 +2,7 @@
describe "/admin/comments/index.html.erb" do
after(:each) do
- rendered.should be_valid_xhtml_fragment
+ rendered.should be_valid_html5_fragment
end
it 'should render' do
View
2  spec/views/admin/comments/show.html.erb_spec.rb
@@ -2,7 +2,7 @@
describe "/admin/comments/show.html.erb" do
after(:each) do
- rendered.should be_valid_xhtml_fragment
+ rendered.should be_valid_html5_fragment
end
it 'should render' do
View
2  spec/views/admin/dashboard/show.html.erb_spec.rb
@@ -6,7 +6,7 @@
end
after(:each) do
- rendered.should be_valid_xhtml_fragment
+ rendered.should be_valid_html5_fragment
end
it 'should render' do
View
2  spec/views/admin/pages/index.html.erb_spec.rb
@@ -2,7 +2,7 @@
describe "/admin/pages/index.html.erb" do
after(:each) do
- rendered.should be_valid_xhtml_fragment
+ rendered.should be_valid_html5_fragment
end
it 'should render' do
View
2  spec/views/admin/pages/new.html.erb_spec.rb
@@ -2,7 +2,7 @@
describe "/admin/pages/new.html.erb" do
after(:each) do
- rendered.should be_valid_xhtml_fragment
+ rendered.should be_valid_html5_fragment
end
it 'should render' do
View
2  spec/views/admin/pages/show.html.erb_spec.rb
@@ -2,7 +2,7 @@
describe "/admin/pages/show.html.erb" do
after(:each) do
- rendered.should be_valid_xhtml_fragment
+ rendered.should be_valid_html5_fragment
end
it 'should render' do
View
2  spec/views/admin/posts/index.html.erb_spec.rb
@@ -2,7 +2,7 @@
describe "/admin/posts/index.html.erb" do
after(:each) do
- rendered.should be_valid_xhtml_fragment
+ rendered.should be_valid_html5_fragment
end
it 'should render' do
View
2  spec/views/admin/posts/new.html.erb_spec.rb
@@ -2,7 +2,7 @@
describe "/admin/posts/new.html.erb" do
after(:each) do
- rendered.should be_valid_xhtml_fragment
+ rendered.should be_valid_html5_fragment
end
it 'should render' do
View
2  spec/views/admin/posts/show.html.erb_spec.rb
@@ -2,7 +2,7 @@
describe "/admin/posts/show.html.erb" do
after(:each) do
- rendered.should be_valid_xhtml_fragment
+ rendered.should be_valid_html5_fragment
end
it 'should render' do
View
2  spec/views/admin/sessions/new.html.erb_spec.rb
@@ -2,7 +2,7 @@
describe "/admin/sessions/new.html.erb" do
after(:each) do
- rendered.should be_valid_xhtml_fragment
+ rendered.should be_valid_html5_fragment
end
it "renders" do
View
2  spec/views/admin/undo_items/index.html.erb_spec.rb
@@ -2,7 +2,7 @@
describe "/admin/undo_items/index.html.erb" do
after(:each) do
- rendered.should be_valid_xhtml_fragment
+ rendered.should be_valid_html5_fragment
end
it 'should render' do
View
2  spec/views/archives/index.html.erb_spec.rb
@@ -21,7 +21,7 @@ def tag(name)
end
after(:each) do
- rendered.should be_valid_xhtml_fragment
+ rendered.should be_valid_html5_fragment
end
it 'renders posts grouped by month' do
View
2  spec/views/pages/show.html.erb_spec.rb
@@ -15,7 +15,7 @@
end
after(:each) do
- rendered.should be_valid_xhtml_fragment
+ rendered.should be_valid_html5_fragment
end
it "should render a page" do
View
2  spec/views/posts/index.html.erb_spec.rb
@@ -21,7 +21,7 @@
end
after(:each) do
- rendered.should be_valid_xhtml_fragment
+ rendered.should be_valid_html5_fragment
end
it "should render list of posts" do
View
2  spec/views/posts/show.html.erb_spec.rb
@@ -38,7 +38,7 @@
end
after(:each) do
- rendered.should be_valid_xhtml_fragment
+ rendered.should be_valid_html5_fragment
end
it "should render a post" do
Please sign in to comment.
Something went wrong with that request. Please try again.