Re: [rspec-users] Specing based on user roles

2008-11-12 Thread Jesse Clark
On Nov 6, 2008, at 8:01 AM, David Chelimsky wrote: I've really moved away from shared example groups and started writing more targeted macros. So I might do something like this: def for_roles *roles roles.each do |role| before(:each) { login_as role } yield end end describe OrdersCont

Re: [rspec-users] Correct way to spec partials

2008-11-12 Thread Jesse Clark
On Nov 12, 2008, at 12:11 AM, Matt Wynne wrote: On 12 Nov 2008, at 00:51, Jesse Clark wrote: On Oct 26, 4:49 am, "David Chelimsky" <[EMAIL PROTECTED]> wrote: On Thu, Oct 23, 2008 at 8:07 PM, Oleksandr Rudyk <[EMAIL PROTECTED]> wrote: Hi everybody, 1) Does anybody hav

Re: [rspec-users] Correct way to spec partials

2008-11-11 Thread Jesse Clark
On Oct 26, 4:49 am, "David Chelimsky" <[EMAIL PROTECTED]> wrote: > On Thu, Oct 23, 2008 at 8:07 PM, Oleksandr Rudyk <[EMAIL PROTECTED]> wrote: > > Hi everybody, > > 1) Does anybody have full working example of how to test partial templates? > > 2) What the correct place to testpartials: controlle

[rspec-users] Problem with namespaced controller, form_for, and view specs

2008-11-04 Thread Jesse Clark
Hello, I have encountered a problem with the view tests involving a form_for tag that references a namespaced controller. My controller is: class Admin::AuthenticationProvidersController < ApplicationController The form_for tag from /app/views/admin/authentication_providers/ edit.html.erb: