Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- require 'spec_helper'
- describe "posts/show.html.erb" do
- before(:each) do
- @post = assign(:post, stub_model(Post,:id=>1,:title => "Test",:description=>'Want to contribute Engines'))
- end
- it "displays the post title with description" do
- render
- rendered.should contain("Test")
- rendered.should contain("Want to contribute Engines")
- end
- it "displays the edit link" do
- render
- rendered.should have_selector('a',:href=>edit_post_path(@post.id),:content => 'Edit')
- end
- it "displays the back link to list the post" do
- render
- rendered.should have_selector('a',:content=>'Back',:href=>posts_path)
- end
- end
Add Comment
Please, Sign In to add comment