Re: [rspec-users] Is testing output within content_for possible?

2008-04-20 Thread Bryan Ray
This might be of some use: http://rubyforge.org/pipermail/rspec-users/2007-June/001954.html On Sat, Apr 19, 2008 at 9:55 PM, Ben Mabey <[EMAIL PROTECTED]> wrote: > Chris Olsen wrote: > > I wanted to test that the links below were being rendered in the views. > > > > - content_for :sidebar do > >

Re: [rspec-users] Is testing output within content_for possible?

2008-04-20 Thread Chris Olsen
Bryan Ray wrote: > This might be of some use: > > http://rubyforge.org/pipermail/rspec-users/2007-June/001954.html > That should do it! Thanks Bryan -- Posted via http://www.ruby-forum.com/. ___ rspec-users mailing list rspec-users@rubyforge.org http

Re: [rspec-users] Is testing output within content_for possible?

2008-04-20 Thread Zach Dennis
You can also render a testing layout which yields the content. IE: render "foo", :layout => "testing" In layouts/testing.html.erb: <%= yield :sidebar %> Zach On Sun, Apr 20, 2008 at 1:00 PM, Chris Olsen <[EMAIL PROTECTED]> wrote: > Bryan Ray wrote: > > This might be of some use: > > > > h

[rspec-users] Mocking Net::SSH connections

2008-04-20 Thread Jamie D
Hi, So I'm stuck again with creating a mock for Net::SSH, I've managed to mock the call to Net::SSH.start and yield the Net::SSH mock but I am totally stuck with mocking the session.shell.sync call and will also need to mock the shell.send_command call also. Any help much appreciated. When I run

Re: [rspec-users] Mocking Net::SSH connections

2008-04-20 Thread Ashley Moran
On 21 Apr 2008, at 07:03, Jamie D wrote: > Net::SSH.should_receive(:shell).and_return('something') This should be @ssh.should_receive(:shell).and_return('something') But actually it will need to return a mock with :sync stubbed for the line: shell = session.shell.sync Ashley -- http://www.