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 "cats/edit" do | |
| before(:each) do | |
| @cat = assign(:cat, stub_model(Cat, | |
| :name => "MyString" | |
| )) | |
| end | |
| it "renders the edit cat form" do |
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
| # RSpec 2.0 syntax Cheet Sheet by http://ApproachE.com | |
| # Edited by webtempest.com | |
| # ====================== Rails examples ===================== | |
| # ---------------------- Login Support ------------------------- | |
| module LoginSupport | |
| # Fake a login for Controller specs | |
| def fake_login_as(user) | |
| @request.session[:user_id] = user ? user.id : nil |
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
| rgregr |
NewerOlder