Re: [rspec-users] Prepare for newbie-ness

2008-09-17 Thread Mark Wilden
On Tue, Sep 16, 2008 at 6:11 PM, Scott Taylor [EMAIL PROTECTED] wrote: Yeah - I use a debugger all the time I regard using the debugger as a bit of a smell. It often means my code isn't clear enough to just bench-step through. In a way, it's like commenting. Complicated code often needs

Re: [rspec-users] Cucumber: pending specs

2008-09-17 Thread Matt Wynne
We found that we can raise a Cucumber::Pending error in the step matcher to achieve the same effect, though in practice we're tending to just write PENDING in the feature and break the link to the step matcher. Actually something that would really help us is the ability to comment out

Re: [rspec-users] How to write a step for a feature with a select control

2008-09-17 Thread Damian Jones
Check out these resources: http://blog.davidchelimsky.net/assets/2008/7/14/IntegrationTestingWithRSpec.pdf.zip http://www.brynary.com/uploads/Story_Driven_Development.pdf Thanks David, They are excellent resources, cleared up a lot of things for me. Damian -- Posted via

Re: [rspec-users] How to write a step for a feature with a select control

2008-09-17 Thread Joseph Wilk
To follow on from David's great links, I posted an article recently which has a collection of links that I found very useful while learning stories. It also has some of the lessons I learnt along the way. Thought it might be helpful.

Re: [rspec-users] Prepare for newbie-ness

2008-09-17 Thread Martin Streicher
I find the debugger helpful to step through the underlying Rails code when I am perplexed about the (errant) operation of something. The underworld is full of wonderful secrets. Plus, I do make mistakes and misinterpret and the debugger lets me take a look around. I try to avoid making

Re: [rspec-users] Cucumber: pending specs

2008-09-17 Thread Chris Flipse
I'm finding another case where I'll get unintended breaks, and it's not so easy to avoid as adding a PENDING to the end of a step matcher. Scenario: none of these are pending Given a completed feature # green When I submit a bad create post # green

Re: [rspec-users] Cucumber: pending specs

2008-09-17 Thread David Chelimsky
On Wed, Sep 17, 2008 at 8:52 AM, Chris Flipse [EMAIL PROTECTED] wrote: I'm finding another case where I'll get unintended breaks, and it's not so easy to avoid as adding a PENDING to the end of a step matcher. Scenario: none of these are pending Given a completed feature

Re: [rspec-users] Prepare for newbie-ness

2008-09-17 Thread Scott Taylor
On Sep 17, 2008, at 9:01 AM, Martin Streicher wrote: I find the debugger helpful to step through the underlying Rails code when I am perplexed about the (errant) operation of something. The underworld is full of wonderful secrets. Plus, I do make mistakes and misinterpret and the

Re: [rspec-users] Cucumber - stub! or mock?

2008-09-17 Thread Tim Glen
Why don't use just use a slug for these things? In other words - use a unique name for each record, since the numbers 10 and 11 don't mean much to anyone. Then, use a factory (like FixtureReplacement or Object Daddy) to generate the records in env.rb. Here's how you'd do that with

Re: [rspec-users] Prepare for newbie-ness

2008-09-17 Thread James Cox
Oh and to answer your question Martin - it's a fairly common step for both. Your absolute best bet is going to peepcode.com and watching all the vids on speccing. it should give you more than enough starting information about approach. BTW - do any 'proper' tdd/bdd types here reccommend

Re: [rspec-users] Prepare for newbie-ness

2008-09-17 Thread James Cox
On 16 Sep 2008, at 20:05, David Chelimsky wrote: On Tue, Sep 16, 2008 at 1:59 PM, Mark Wilden [EMAIL PROTECTED] wrote: On Tue, Sep 16, 2008 at 10:00 AM, Martin Streicher [EMAIL PROTECTED] wrote: 3/ Has any documented how to run the debugger via rspec to help track down errors? We

[rspec-users] autotest with a non-rspec project

2008-09-17 Thread Dan
Hello, I'm working on a contract that doesn't use rspec. When I try and run autotest I get the following: loading autotest/rails_rspec Autotest style autotest/rails_rspec doesn't seem to exist. Aborting. I uninstalled the rspec gem and don't have the rspec plugins loaded for the project. I

[rspec-users] webrat the way to go?

2008-09-17 Thread DyingToLearn
Hi, Here is the short version of my question: For stories, is webrat the way to go? How many of you use webrat? How many don't? Here is the long version: I have been writing specs for some time now. I have noticed that once I learned how to write specs (both the syntax and the techniques) it

[rspec-users] rspec on javascript links

2008-09-17 Thread saltzmanjoelh
I have a lot of AJAX calls that make new divs or update information on the page. Is there anyway to test and if the right infomation has been received or displayed after an onclick action? If that makes sense?... -- View this message in context:

[rspec-users] Failing in TextMate but not in rake...

2008-09-17 Thread ed_ruder
When I run a spec file from TextMate using the RSpec bundle's Run Examples command (either using command-R or the bundle menu item with the spec file open), I get an error dialog with the following text: Missing the Rails 2.0.2 gem. Please `gem install -v=2.0.2 rails`, update your

Re: [rspec-users] cucumber and openid

2008-09-17 Thread [EMAIL PROTECTED]
Thanks for your answers! Just for the record, first I override methods and it really worked :-) However quite soon I realized, why not to use local openid server instead. So I picked up masquerade[1] as local openid server. Wow, now it feels much cleaner and more real to run features. Cheers,

[rspec-users] How to count failed and passed examples in one Example Group?

2008-09-17 Thread al3kc
Hi all, Is it possible to count failed and passed examples in ONE Example Group? Thanks, ___ rspec-users mailing list rspec-users@rubyforge.org http://rubyforge.org/mailman/listinfo/rspec-users

[rspec-users] How to count examples in one example group

2008-09-17 Thread al3kc
Hi all, Is it possible to count how many Examples failed and passed in one Example Group? I need to generate report only with Example Group name and numbers of failed and passed examples forn each Example Group. Thanks, Alex ___ rspec-users mailing

[rspec-users] help on skipping a before_filter for a story

2008-09-17 Thread Eric Harris-Braun
Hi folks, I'm hoping for a bit of help on best-practices for skipping a before_filter when running a particular step. Specifically the authentication filter. What happens is that the post (see code below) returns a redirect response to the login page triggered by the of my authentication

Re: [rspec-users] autotest with a non-rspec project

2008-09-17 Thread David Chelimsky
On Wed, Sep 17, 2008 at 11:51 AM, Dan [EMAIL PROTECTED] wrote: Hello, I'm working on a contract that doesn't use rspec. When I try and run autotest I get the following: loading autotest/rails_rspec Autotest style autotest/rails_rspec doesn't seem to exist. Aborting. I uninstalled the

Re: [rspec-users] help on skipping a before_filter for a story

2008-09-17 Thread aslak hellesoy
On Tue, Sep 9, 2008 at 2:33 AM, Eric Harris-Braun [EMAIL PROTECTED] wrote: Hi folks, I'm hoping for a bit of help on best-practices for skipping a There are no practices for this (or anything else) that are better than any other practice. before_filter when running a particular step.

Re: [rspec-users] [ANN] Cucumber Textmate Bundle

2008-09-17 Thread aslak hellesoy
On Wed, Sep 17, 2008 at 8:42 PM, Ben Mabey [EMAIL PROTECTED] wrote: Hey all, I am in the process of porting my RSpec Story Textmate bundle over to Cucumber. So far I have the syntax highlighting, file switching, and running of the features and single scenarios done. So not all the

Re: [rspec-users] webrat the way to go?

2008-09-17 Thread aslak hellesoy
On Tue, Sep 9, 2008 at 6:42 AM, DyingToLearn [EMAIL PROTECTED] wrote: Hi, Here is the short version of my question: For stories, is webrat the way to go? How many of you use webrat? How many don't? I use it and love it. When it doesn't do what I need (rarely) it's trivial to drop down an

Re: [rspec-users] rspec on javascript links

2008-09-17 Thread aslak hellesoy
On Tue, Sep 9, 2008 at 1:21 AM, saltzmanjoelh [EMAIL PROTECTED] wrote: I have a lot of AJAX calls that make new divs or update information on the page. Is there anyway to test and if the right infomation has been received or displayed after an onclick action? If that makes sense?... If you

Re: [rspec-users] [ANN] Cucumber Textmate Bundle

2008-09-17 Thread Ben Mabey
aslak hellesoy wrote: On Wed, Sep 17, 2008 at 8:42 PM, Ben Mabey [EMAIL PROTECTED] wrote: Hey all, I am in the process of porting my RSpec Story Textmate bundle over to Cucumber. So far I have the syntax highlighting, file switching, and running of the features and single scenarios done.

Re: [rspec-users] help on skipping a before_filter for a story

2008-09-17 Thread Matt Wynne
We just write a step that says 'Given I am logged in' which actually walks through the login process on the screens (fills_in :username etc). However you could have another step like 'Given authenication is disabled on the site' which does something dirty to your ApplicationController

Re: [rspec-users] webrat the way to go?

2008-09-17 Thread Matt Wynne
On 9 Sep 2008, at 05:42, DyingToLearn wrote: Hi, Here is the short version of my question: For stories, is webrat the way to go? How many of you use webrat? How many don't? Here is the long version: I have been writing specs for some time now. I have noticed that once I learned how to write

Re: [rspec-users] [ANN] Cucumber Textmate Bundle

2008-09-17 Thread aslak hellesoy
On Wed, Sep 17, 2008 at 10:56 PM, Ben Mabey [EMAIL PROTECTED] wrote: aslak hellesoy wrote: On Wed, Sep 17, 2008 at 8:42 PM, Ben Mabey [EMAIL PROTECTED] wrote: Hey all, I am in the process of porting my RSpec Story Textmate bundle over to Cucumber. So far I have the syntax highlighting, file

Re: [rspec-users] [ANN] Cucumber Textmate Bundle

2008-09-17 Thread Ben Mabey
aslak hellesoy wrote: On Wed, Sep 17, 2008 at 10:56 PM, Ben Mabey [EMAIL PROTECTED] wrote: aslak hellesoy wrote: On Wed, Sep 17, 2008 at 8:42 PM, Ben Mabey [EMAIL PROTECTED] wrote: Hey all, I am in the process of porting my RSpec Story Textmate bundle over to Cucumber. So

Re: [rspec-users] Prepare for newbie-ness

2008-09-17 Thread Mark Wilden
On Wed, Sep 17, 2008 at 2:54 PM, Matt Wynne [EMAIL PROTECTED] wrote: On 16 Sep 2008, at 23:38, James Cox wrote: BTW - do any 'proper' tdd/bdd types here reccommend any specific books? I've just started reading Scripted GUI Testing with Ruby, which has sections on RSpec, ZenTest and

Re: [rspec-users] Prepare for newbie-ness

2008-09-17 Thread David Chelimsky
On Wed, Sep 17, 2008 at 4:54 PM, Matt Wynne [EMAIL PROTECTED] wrote: On 16 Sep 2008, at 23:38, James Cox wrote: BTW - do any 'proper' tdd/bdd types here reccommend any specific books? The Michael Feathers book (Working with Legacy Code) is well regarded on this list for teaching you how to

Re: [rspec-users] [ANN] Cucumber Textmate Bundle

2008-09-17 Thread aslak hellesoy
On Wed, Sep 17, 2008 at 11:35 PM, Ben Mabey [EMAIL PROTECTED] wrote: aslak hellesoy wrote: On Wed, Sep 17, 2008 at 10:56 PM, Ben Mabey [EMAIL PROTECTED] wrote: aslak hellesoy wrote: On Wed, Sep 17, 2008 at 8:42 PM, Ben Mabey [EMAIL PROTECTED] wrote: Hey all, I am in the process of

Re: [rspec-users] Prepare for newbie-ness

2008-09-17 Thread aslak hellesoy
On Tue, Sep 16, 2008 at 7:00 PM, Martin Streicher [EMAIL PROTECTED] wrote: A few questions from someone new to rspec. 1/ I have several complex yet largely independent models using rspec to test internals and computation methods. I am about to tackle models that have several ties to each

Re: [rspec-users] Prepare for newbie-ness

2008-09-17 Thread David Chelimsky
On Wed, Sep 17, 2008 at 5:58 PM, aslak hellesoy Can we all please stop talking about best practices? It always depends. If people talk about best practices then others will be more inclined to apply them without thinking. http://www.satisfice.com/blog/archives/27

Re: [rspec-users] [ANN] Cucumber Textmate Bundle

2008-09-17 Thread Ben Mabey
aslak hellesoy wrote: On Wed, Sep 17, 2008 at 11:35 PM, Ben Mabey [EMAIL PROTECTED] wrote: aslak hellesoy wrote: On Wed, Sep 17, 2008 at 10:56 PM, Ben Mabey [EMAIL PROTECTED] wrote: aslak hellesoy wrote: On Wed, Sep 17, 2008 at 8:42 PM, Ben Mabey [EMAIL

Re: [rspec-users] The distinctive smell of newbiness

2008-09-17 Thread Martin Streicher
The heart of my question is the seemingly chicken-and-egg-like nature of testing many models that work together. I now have two flavors of tests: tests that keep the models honest (computations and returns values are consistent and accurate) and tests that operate at the macro level as

Re: [rspec-users] Newbiness

2008-09-17 Thread Martin Streicher
Hey, James. Nice to hear from you. If you hear of any work, send it my way. I did watch the PeepCode stuff. I will watch it again now that I have a little experience with the whole thing -- perhaps it will fill in some blanks. On Sep 17, 2008, at 2:13 PM, [EMAIL PROTECTED] wrote:

Re: [rspec-users] cucumber - mark a step as pending

2008-09-17 Thread [EMAIL PROTECTED]
On Sep 9, 11:16 pm, Pat Maddox [EMAIL PROTECTED] wrote: aslak hellesoy [EMAIL PROTECTED] writes: On Tue, Sep 9, 2008 at 7:16 PM, David Chelimsky [EMAIL PROTECTED] wrote: Aslak - I think Matt is looking for this: Given /blah/ do  pending end I'm not crazy about this feature. We

[rspec-users] should_receive working in before(:each) but not in example

2008-09-17 Thread Tim Haines
Hi there, I'm striking a wee problem - and haven't been able to figure it out. In my before statement I'm setting up a mock video. I'd like one of my examples to check that original= and save! are being called on the mock video, so I have an example that looks like this: it should update

Re: [rspec-users] should_receive working in before(:each) but not in example

2008-09-17 Thread Mark Wilden
On Wed, Sep 17, 2008 at 8:23 PM, Tim Haines [EMAIL PROTECTED] wrote: it should update the original video and save the video do post :upload_video, :video_id = 'hi', :Filedata = @video_file @vid.should_receive(:original=) @vid.should_receive(:save!) end

Re: [rspec-users] should_receive working in before(:each) but not in example

2008-09-17 Thread Tim Haines
Lol. I need another coffee. The should's needed to be above the post. :-) Tim. On Thu, Sep 18, 2008 at 3:23 PM, Tim Haines [EMAIL PROTECTED] wrote: Hi there, I'm striking a wee problem - and haven't been able to figure it out. In my before statement I'm setting up a mock video. I'd like