ruby on rails 3 - how to test for existing htm5shiv in source code using rspec? -
how can test rails3 application existing htm5shiv code using rspec?
<!--[if lt ie 9]> <script src="http://html5shim.googlecode.com/svn/trunk/html5.js"></script> <![endif]-->
this demoapp:
rails new renderdemo cd renderdemo/ rails g controller staticpages home --no-test-framework
in config/routes.rb
root to: "static_pages#home"
removed public/index.html
rm -f public/index.html
created partial html5shiv app/views/layouts/_html5shiv.html.erb
<!--[if lt ie 9]> <script src="http://html5shim.googlecode.com/svn/trunk/html5.js"></script> <![endif]-->
i rendered in app/views/layouts/application.html.erb
<head> . . . <%= render 'layouts/html5shiv' %> </head>
now when visit demoapp's source code see partial has been added.
how can verify rspec, rendering successful? or may check source code html5shiv existing on each page?
Comments
Post a Comment