Skip to content
Browse files

Add test to check that whitespace is preserved in post code blocks.

  • Loading branch information...
1 parent 436b5e2 commit db312c752b5bb0769593043585b74cb926327ab9 @nathanaelkane nathanaelkane committed with jasoncodes
View
4 spec/acceptance/posts_spec.rb
@@ -106,6 +106,10 @@
it 'should not show the summary' do
page.should_not have_content('This is another custom & test summary.')
end
+
+ it 'should preserve whitespace on code blocks' do
+ page.source.should match '<pre><code>First line of code.&#x000A; Second line of code.&#x000A;</code></pre>'
+ end
end
context 'Posts#feed' do
View
3 spec/support/rails_app/app/posts/2011-05-01-full-metadata.markdown
@@ -8,3 +8,6 @@ summary: This is another custom & test summary.
First paragraph of content.
Second paragraph of content.
+
+ First line of code.
+ Second line of code.
View
2 todo.txt
@@ -1,6 +1,6 @@
TODO
----
-[ ] RSpec acceptance test for pre code blocks (= vs ~)
+[x] RSpec acceptance test for pre code blocks (= vs ~)
[x] RSpec tests for the xml feed
[x] 404 for missing post or invalid slug
[x] Add post author to feed

0 comments on commit db312c7

Please sign in to comment.
Something went wrong with that request. Please try again.