Created
          May 1, 2013 19:14 
        
      - 
      
 - 
        
Save ariejan/5497596 to your computer and use it in GitHub Desktop.  
    me
  
        
  
    
      This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
      Learn more about bidirectional Unicode characters
    
  
  
    
  | let(:post) { create :post, body: "Blah en *narf*" } | |
| it "let's Kramdown do the heavy lifting" do | |
| kramdown = double | |
| kramdown.should_receive(:to_html) | |
| Kramdown::Document.should_receive(:new).with(post.body).and_return(kramdown) | |
| helper.markdown(post.body) | |
| end | 
  
    Sign up for free
    to join this conversation on GitHub.
    Already have an account?
    Sign in to comment
  
            
Why spec the helper implementation instead of its behaviour? Also, why use a post at all? Why not say: