Sha256: 38046475b5335d469f0980ea461b8c5b670659944c7546bdc090579113bdf6cd
Contents?: true
Size: 967 Bytes
Versions: 5
Compression:
Stored size: 967 Bytes
Contents
require 'shinmun' describe Shinmun::Post do POST = <<-END --- category: Javascript date: 2008-09-09 tags: template, engine, json title: Patroon - a Javascript Template Engine --- Patroon is a template engine written in Javascript in about 100 lines of code. It takes existing DOM nodes annotated with CSS classes and expand a data object according to simple rules. Additionally you may use traditional string interpolation inside attribute values and text nodes. END it 'should parse and dump in the same way' do Shinmun::Post.new(:type => 'md', :src => POST).dump.should == (POST) end it "should parse the yaml header" do post = Shinmun::Post.new(:type => 'md', :src => POST) post.title.should == 'Patroon - a Javascript Template Engine' post.category.should == 'Javascript' post.date.should == Date.new(2008,9,9) post.tags.should == 'template, engine, json' post.tag_list.should == ['template', 'engine', 'json'] end end
Version data entries
5 entries across 5 versions & 2 rubygems
Version | Path |
---|---|
georgi-shinmun-0.4.1 | test/post_spec.rb |
georgi-shinmun-0.4 | test/post_spec.rb |
georgi-shinmun-0.5 | test/post_spec.rb |
shinmun-0.5.2 | test/post_spec.rb |
shinmun-0.5 | test/post_spec.rb |