test/test_helpers.rb in frank-0.2.2 vs test/test_helpers.rb in frank-0.2.3
- old
+ new
@@ -39,9 +39,27 @@
template = @frank.render_path('lorem_test.haml')
reg = /<p class='paragraphs'>(?:[^\n]+(?:\n\n)?){1}<\/p>/m
assert_match reg, template
end
+ should 'render haml with lorem name' do
+ template = @frank.render_path('lorem_test.haml')
+ reg = /<p class='name'>\w+\s\w+<\/p>/m
+ assert_match reg, template
+ end
+
+ should 'render haml with lorem email' do
+ template = @frank.render_path('lorem_test.haml')
+ reg = /<p class='email'>[\w-]+@\w+\.\w+<\/p>/m
+ assert_match reg, template
+ end
+
+ should 'render haml with lorem date' do
+ template = @frank.render_path('lorem_test.haml')
+ reg = /<p class='date'>\d{4}-\d{2}-\d{2}<\/p>/m
+ assert_match reg, template
+ end
+
should 'render image url using imager' do
template = @frank.render_path('lorem_test.haml')
reg = /<img src='\/_img\/400x300.jpg\?random\d{5}' \/>/
assert_match reg, template
end
\ No newline at end of file