Created
March 29, 2011 07:16
-
-
Save ilstar/891932 to your computer and use it in GitHub Desktop.
Rspec View Test
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' | |
| # the string is your real path of view file. | |
| describe "home/index" do | |
| before do | |
| login_as @user | |
| template.stub('smart_link_to').and_return('') | |
| @user = Factory(:user) | |
| end | |
| it "should not display renren form" do | |
| template.should_receive('display?').and_return(false) | |
| render | |
| response.should_not have_tag('div[id=?]', 'user_id') | |
| end | |
| end |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment