Loading ...
Sorry, an error occurred while loading the content.
 

Re: Writing new tests after refactoring

Expand Messages
  • Brian Victor
    ... I ll rephrase then. My concern is that every time I test authorization on a class that refactors into is_superuser, I have to write the same three tests.
    Message 1 of 3 , Jul 21, 2007
      Tim Ottinger wrote:
      > The delegation is descriptive. I thought I said that. I thought you
      > were asking whether you should change the tests to use is_superuser or
      > keep them with can_perform_task. I understood the code, but not the
      > question. So I'm not sure what the question is.

      I'll rephrase then. My concern is that every time I test authorization
      on a class that refactors into is_superuser, I have to write the same
      three tests. That seems like a code smell to me. Is there a reason to
      keep duplicating those tests? My instinct is just to write one
      delegation test instead of three user tests.

      --
      Brian
    Your message has been successfully submitted and would be delivered to recipients shortly.