spec/bonsai/page_spec.rb in bonsai-1.1.3 vs spec/bonsai/page_spec.rb in bonsai-1.1.4
- old
+ new
@@ -172,16 +172,22 @@
it "should respond to to_hash" do
@page.should respond_to(:to_hash)
end
- %w(slug permalink name page_title children siblings parent ancestors magic navigation).each do |key|
+ %w(slug permalink name page_title children siblings parent ancestors magic navigation updated_at created_at).each do |key|
it "should have a to_hash key for #{key}" do
@page.to_hash.keys.should include(key.to_sym)
end
end
+ it "should include global site variables from site.yml" do
+ @page.to_hash[:site_name].should == "Bonsai"
+ @page.to_hash[:url].should == "http://tinytree.info"
+ @page.to_hash[:copyright].should == 2010
+ end
+
describe "disk_assets" do
before :all do
@vars = @page.to_hash
end
@@ -196,21 +202,9 @@
it "it should be a an array of hashes" do
@vars[:magic].should be_an_instance_of(Array)
@vars[:magic].first.should be_an_instance_of(Hash)
@vars[:magic].size.should == 2
- end
- end
-
- describe "boolean" do
- it "should be false" do
- pending
- @vars[:child?].should be_false
- end
-
- it "should be true" do
- pending
- @vars[:magic?].should be_true
end
end
end
end