spec/rendering_spec.rb in tdreyno-staticmatic-2.1.4 vs spec/rendering_spec.rb in tdreyno-staticmatic-2.9.0
- old
+ new
@@ -23,48 +23,27 @@
it "should render haml template" do
output = @staticmatic.render("haml_test")
output.should include("<strong>Hello from haml</strong>")
end
-
- if ActionView::Template.template_handler_extensions.include? :markdown
- it "should render markdown template" do
- output = @staticmatic.render("markdown_test")
- output.should match(/<strong>Hello from markdown<\/strong>/)
- end
- end
- if ActionView::Template.template_handler_extensions.include? :textile
- it "should render textile template" do
- output = @staticmatic.render("textile_test")
- output.should match(/<strong>Hello from textile<\/strong>/)
- end
- end
-
- if ActionView::Template.template_handler_extensions.include? :liquid
- it "should render liquid template" do
- output = @staticmatic.render("liquid_test")
- output.should match(/<strong>Hello from liquid<\/strong>/)
- end
- end
-
it "should register a css renderer" do
output = @staticmatic.render("stylesheets/site.css")
output.should include("body {")
output.should include("font-family: verdana")
end
it "should setup up css type correctly" do
- @staticmatic.determine_format_for("stylesheets/site.css").should == :css
+ @staticmatic.template("stylesheets/site.css").view.template_format.should == :css
end
it "should determine format for file with extension" do
- @staticmatic.determine_format_for("stylesheets/site.css.sass").should == :css
+ @staticmatic.template("stylesheets/site.css.sass").view.template_format.should == :css
end
it "should have sensible defaults for haml & sass" do
- @staticmatic.determine_format_for("stylesheets/site.sass").should == :css
- @staticmatic.determine_format_for("pages/test.haml").should == :html
+ @staticmatic.template("stylesheets/site.sass").view.template_format.should == :css
+ @staticmatic.template("pages/test.haml").view.template_format.should == :html
end
it "should render index template from sub-directory" do
output = @staticmatic.render("services/")
output.should include("Services")
\ No newline at end of file