Re: [rspec-users] Specs and Libs

2007-10-09 Thread Eivind Uggedal
/103625 I have speced AuthenticatedSystem in my own auth plugin: http://acts-as-authentable.googlecode.com Could act as a staring point for your endeavors. -- Cheers, Eivind Uggedal Engineer, Faculty of Social Science, MSc Computer Science, University of Oslo

Re: [rspec-users] rcov including ruby lib

2007-09-25 Thread Eivind Uggedal
(comma-separated regexp list) --exclude-only PATTERNS Skip info only for files matching the given patterns. Here's an example of such a rake task from my latest project: http://pastie.caboo.se/100531 -- Cheers, Eivind Uggedal Engineer, Faculty

Re: [rspec-users] Can't seem to spec a ActiveRecord::RecordInvalid exception properly...

2007-08-10 Thread Eivind Uggedal
I asked exactly this question on this list 2 days ago... See http://pastie.caboo.se/85887 for a working example. One has to mock out ActiveRecord::Errors::full_messages for it to work under Rails. Cheers, Eivind Uggedal On 8/9/07, David Chelimsky [EMAIL PROTECTED] wrote: On 8/8/07, Fischer

Re: [rspec-users] Problems with raising errors on a mocked object

2007-08-08 Thread Eivind Uggedal
Thanks, that worked great after I had mocked out the ActiveRecord::Errors::full_messages: http://pastie.caboo.se/85887 Cheers, Eivind Uggedal On 8/8/07, David Chelimsky [EMAIL PROTECTED] wrote: On 8/8/07, Eivind Uggedal [EMAIL PROTECTED] wrote: Here you go: http://pastie.caboo.se/85876 OK

[rspec-users] Problems with raising errors on a mocked object

2007-08-07 Thread Eivind Uggedal
I'm trying to mock a object to raise a certain error. By doing so I get a ArgumentError on ActiveRecord's save! method: http://pastie.caboo.se/85628 I've tried to debug it but just can't seem to find what I'm doing wrong. Any help is greatly appreciated. Cheers, Eivind Uggedal

Re: [rspec-users] Problems with raising errors on a mocked object

2007-08-07 Thread Eivind Uggedal
Here you go: http://pastie.caboo.se/85876 Eivind On 8/8/07, David Chelimsky [EMAIL PROTECTED] wrote: On 8/7/07, Eivind Uggedal [EMAIL PROTECTED] wrote: I'm trying to mock a object to raise a certain error. By doing so I get a ArgumentError on ActiveRecord's save! method: http