Re: [rspec-users] Philosophical questions

2007-09-13 Thread Jarkko Laine
On 14.9.2007, at 1.10, Pat Maddox wrote: Others have mentioned Story Runner, which is a new feature of RSpec. I'm pretty jazzed about it, because it's a very lightweight tool for acceptance tests. The structure is clean, it just makes sense to me. I wrote an introduction which you can find at ht

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

2007-09-13 Thread Jarkko Laine
On 13.9.2007, at 23.29, aslak hellesoy wrote: 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. I

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

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()

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 have_

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

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 rspec-users@rubyfor

[rspec-users] Need help in View Spec

2007-09-13 Thread Shaker
Hello everyone: I am kind of puzzled in writing spec on view partials. I can not find much information about the "should have_tag" syntax in Rspec. Can rspec test a particular attribute of a tag (e.g. input tag)? Let me put an example here: #../view/group/_index I want to test the "on

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-use

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 appro

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

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 > t

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 http://www.r

Re: [rspec-users] Checking out Rspec

2007-09-13 Thread Bret Pettichord
> > Hmm, I just checked out RSpec on Subclipse last week w/no problems. > What platform are you on, which SVN adapter, etc.? I was using Mac OS X > 10.4.10, Eclipse 3.3, Subclipse 1.2.4, SVNKit. I'm using Eclipse 3.3 on windows with Subclipse 1.2.3. I also reproduced the problem using TortoisseS

[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: @client.stub!(:save!).and_retur

Re: [rspec-users] Authenticating before tests

2007-09-13 Thread sinclair bain
Hi! Have you considered mocking / stubbing to test in isolation if that is appropriate ? sinclair On 9/13/07, Luke Galea <[EMAIL PROTECTED]> wrote: > > Hi all, > > I'm using Goldberg, an engine that provides roles based access > control for my app. I need to login before I can do controller tests

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] > > 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 lin

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 h

Re: [rspec-users] Authenticating before tests

2007-09-13 Thread Jarkko Laine
On 13.9.2007, at 15.25, Luke Galea wrote: Hi all, I'm using Goldberg, an engine that provides roles based access control for my app. I need to login before I can do controller tests, but I can't find any examples of people doing this. Could someone point me in the right direction? This is wh

[rspec-users] Authenticating before tests

2007-09-13 Thread Luke Galea
Hi all, I'm using Goldberg, an engine that provides roles based access control for my app. I need to login before I can do controller tests, but I can't find any examples of people doing this. Could someone point me in the right direction? I thought the simplest way would be to either call t