Forum: Ruby on Rails rspec test cannot be passed when render partial in layout

Announcement (2017-05-07): www.ruby-forum.com is now read-only since I unfortunately do not have the time to support and maintain the forum any more. Please see rubyonrails.org/community and ruby-lang.org/en/community for other Rails- und Ruby-related community platforms.
1a8688b1d13c493617312672facbbf74?d=identicon&s=25 zerogy (Guest)
on 2009-02-10 09:57
(Received via mailing list)
I have a problem stuck me couples of days, could anyone help me?
Thanks very much.
The problem is that rspec test cannot be passed when the layout
contains :partial, once
i removed the :partial, the rspec test passed successfully. I could
not find out the reason.
Below is my code:
application.html.erb
  <body>
    <%= render :partial => 'shared/header' %>
    <div id="wrap">
      <div id="content">
        <%= yield %>
      </div>
    </div>
    <%= render :partial => 'shared/footer' %>
  </body>

users_controller_spec.rb
describe UsersController do
  describe "Requesting /forgot_password using GET" do
    it "should be successful" do
      get :forgot_password
    end
  end
end
This topic is locked and can not be replied to.