spec/lib/mercury/helpers_spec.rb in mercury-0.9.9 vs spec/lib/mercury/helpers_spec.rb in mercury-0.9.10

- old
+ new

@@ -6,12 +6,20 @@ def app Mercury end + before(:all) do + app.extend(Sinatra::MercuryHelpers) + end + + it "should return js file" do - #puts app.render_script("test", "javascript") - #app.css(:hello).should =~ /^<script(.*)<\/script>$/ + app.render_script("Hello World", "javascript").should == "<script type='text/javascript'>\nHello World\n</script>\n" end + it "should return style for all media" do + app.render_style("Hello World").should == "<style type='text/css' media='all' >\nHello World\n</style>\n" + end + end \ No newline at end of file