Skip to content

Instantly share code, notes, and snippets.

@ruprict
Created June 30, 2011 10:46
Show Gist options
  • Save ruprict/1056000 to your computer and use it in GitHub Desktop.
Save ruprict/1056000 to your computer and use it in GitHub Desktop.
RefineryCMS Blog partial view spec
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
@ivanoats
Copy link

works for me to, thanks so much :) !!!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment