Created
June 30, 2011 10:46
-
-
Save ruprict/1056000 to your computer and use it in GitHub Desktop.
RefineryCMS Blog partial view spec
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
require 'spec_helper' | |
describe "blog/shared/_post.html.erb" do | |
let (:post) do | |
stub_model(BlogPost, | |
:title => "Blog", | |
:published_at => Time.now | |
) | |
end | |
before do | |
assign(:post, post) | |
end | |
it "should let users mark the blog post as a bookmark link" do | |
view.should_receive(:blog_post_teaser).and_return("Lorem ipsum") | |
render :partial => "blog/shared/post.html.erb", :locals => {:post => post} | |
rendered.should =~/is a bookmark link/# in the more options field | |
# rendered.should contain checkbox for is_link boolean | |
# rendered.should contain text field for link_url string | |
end | |
end |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
works for me to, thanks so much :) !!!