Changeset 935

Show
Ignore:
Timestamp:
11/10/07 20:55:09 (10 months ago)
Author:
iv..@gweezlebur.com
Message:

Merki: more Page specs, implement one of them

Files:

Legend:

Unmodified
Added
Removed
Modified
Copied
Moved
  • apps/merki/trunk/app/models/page.rb

    r934 r935  
    11class Page < DataMapper::Base 
     2  property :title, :string 
    23end 
    34 
  • apps/merki/trunk/spec/models/page_spec.rb

    r934 r935  
    1515    est laborum." 
    1616  end 
     17   
     18  def textile_text 
     19    "h1. " 
     20  end 
    1721end 
    1822 
    1923describe Page do 
     24  include PageSpecHelper 
    2025  before(:each) do 
    2126    @page = Page.new 
    2227  end 
    2328   
    24   it "should be valid" do 
    25     pending "Needs implementation" 
    26     @page.attributes = valid_page_attributes 
    27     @page.should be_valid 
    28   end 
    29  
    3029  it "should have a title" do 
    31     pending "Needs implementation" 
    3230    @page.title = "My Page" 
    3331    @page.title.should == "My Page" 
     
    4240  it "should have a body" do 
    4341    pending "Needs implementation" 
    44  
    4542    @page.body = lorem_text 
    4643    @page.body.should == lorem_text 
     
    6562    @page.should_not be_valid 
    6663  end 
    67    
     64 
     65  it "should be valid with all attributes" do 
     66    pending "Needs implementation" 
     67    @page.attributes = valid_page_attributes 
     68    @page.should be_valid 
     69  end 
    6870end