Re: [rspec-users] Checking out Rspec

2007-09-13 Thread Bret Pettichord
On 9/12/07, Scott Taylor [EMAIL PROTECTED] wrote: I have been having connection problems with rspec's rubyforge repository for a long time. I'm running my own mirror if you want the subversion link (although the revision numbers are a little bit off). Generally, though, if you are having

Re: [rspec-users] Checking out Rspec

2007-09-13 Thread Jay Levitt
On 9/13/2007 9:43 AM, Bret Pettichord wrote: On 9/12/07, *Scott Taylor* [EMAIL PROTECTED] mailto:[EMAIL PROTECTED] wrote: I have been having connection problems with rspec's rubyforge repository for a long time. I'm running my own mirror if you want the subversion link

[rspec-users] Failing to raise an exception in a stub

2007-09-13 Thread Jarkko Laine
I've come across rather strange behaviour when trying to raise an exception in a stubbed method. I'm speccing the behaviour of a Rails create action, where I'm using save! to catch failed saves. In the case of working save, I'm using the following stub:

Re: [rspec-users] Authenticating before tests

2007-09-13 Thread Jarkko Laine
On 13.9.2007, at 19.52, sinclair bain wrote: Hi! Have you considered mocking / stubbing to test in isolation if that is appropriate ? Right, my example was also assuming that you are using mocks for users. //jarkko -- Jarkko Laine http://jlaine.net http://dotherightthing.com

Re: [rspec-users] Failing to raise an exception in a stub

2007-09-13 Thread aslak hellesoy
On 9/13/07, Jarkko Laine [EMAIL PROTECTED] wrote: I've come across rather strange behaviour when trying to raise an exception in a stubbed method. I'm speccing the behaviour of a Rails create action, where I'm using save! to catch failed saves. In the case of working save, I'm using the

Re: [rspec-users] Philosophical questions

2007-09-13 Thread Pat Maddox
On 9/12/07, Evan David Light [EMAIL PROTECTED] wrote: Disclaimer: The following are observations by a relatively new user (couple of weeks) of RSpec and not intended as RSpec trollbait. Also, forgive me if similar topics have been discussed elsewhere on the mailing list. I at least did the

Re: [rspec-users] Philosophical questions

2007-09-13 Thread David Chelimsky
On 9/13/07, Evan David Light [EMAIL PROTECTED] wrote: My immediate impression was Story == Use Case. Story == User Story User Stories are not the same thing as Use Cases. You may want to google around for some writing on that. Cheers. ___ rspec-users

Re: [rspec-users] Philosophical questions

2007-09-13 Thread Evan David Light
On Sep 13, 2007, at 6:10 PM, Pat Maddox wrote: On 9/12/07, Evan David Light [EMAIL PROTECTED] wrote: ... (Evan's RSpec n00bish ramblings) ... Thanks, Evan Hi Evan, I think you have the right idea about approaching specification from the user's viewpoint (or more appropriately, as

Re: [rspec-users] Need help in View Spec

2007-09-13 Thread Shaker
Yes, I have gone through the documentation before, and I read the reference of 'assert_select' as well. But I still can not figure out a way of testing attributes in a tag. What I know is we can use: should have_tag(tag#id) or should have_tag(tag.class) to select a tag, whereas I don't know how

Re: [rspec-users] Need help in View Spec

2007-09-13 Thread David Chelimsky
On 9/13/07, Shaker [EMAIL PROTECTED] wrote: Yes, I have gone through the documentation before, and I read the reference of 'assert_select' as well. But I still can not figure out a way of testing attributes in a tag. What I know is we can use: should have_tag(tag#id) or should

Re: [rspec-users] Need help in View Spec

2007-09-13 Thread David Chelimsky
On 9/13/07, Shaker [EMAIL PROTECTED] wrote: I can not find much information about the should have_tag syntax in Rspec. http://rspec.rubyforge.org/rdoc-rails/classes/Spec/Rails/Matchers.html#M11 ___ rspec-users mailing list

Re: [rspec-users] Need help in View Spec

2007-09-13 Thread David Chelimsky
On 9/13/07, Shaker [EMAIL PROTECTED] wrote: Sorry, that's another spec caused the error. It is working. Thank you very much Glad you got it worked out. Cheers, David Shaker wrote: Hello To spec the example I mentioned before, I wrote the spec as what you suggested

Re: [rspec-users] Need help in View Spec

2007-09-13 Thread Shaker
Sorry, that's another spec caused the error. It is working. Thank you very much Shaker wrote: Hello To spec the example I mentioned before, I wrote the spec as what you suggested #../view/group/index_spec.rb describe /group/_index_spec do it should call JS function when click the

Re: [rspec-users] Need help in View Spec

2007-09-13 Thread Shaker
Hello To spec the example I mentioned before, I wrote the spec as what you suggested #../view/group/index_spec.rb describe /group/_index_spec do it should call JS function when click the button do render '/group/_index' response.should have_tag(input[onclick=?], update())