Re: [rspec-users] Need Help

2009-09-22 Thread Matt Wynne
On 22 Sep 2009, at 06:34, Mithun Perera wrote: Mithun Perera wrote: Hi all, I am an university student and these days i am on training period. So i want to know about ruby on on rails "cucumber and Rspec". If somebody know about these fields please help me. If not please send me an tutorial

[rspec-users] rspec-rails and rack middleware

2009-09-22 Thread Aaron Gibralter
Ah ok. I tried that, but I can't seem to figure out what to use for the def app ... end method in my spec though. The app is my Rails app... for now I have something like: http://www.pastie.org/625791 I can get the dummy_app to work, but now I'm trying to figure out how to use my Rails app. I'l

Re: [rspec-users] describe block proc parameter as alternative to before blocks?

2009-09-22 Thread nruth
I agree that lambda'ing here would not help readability, I thought that when I wrote it; it would quickly spiral out of control and make things look horrible. While I certainly appreciate the before / initialize parallel, I hadn't thought of it like that before. I don't think about ruby when writi

Re: [rspec-users] describe block proc parameter as alternative to before blocks?

2009-09-22 Thread Stephen Eley
On Tue, Sep 22, 2009 at 8:55 AM, nruth wrote: > > I guess the short answer is no, stop being silly, [...] It wasn't silly at all to raise the question. I apologize sincerely if I gave the impression that I was trying to be insulting. It's _very_ worthwhile to ask questions about The Way Things

Re: [rspec-users] rspec-rails and rack middleware

2009-09-22 Thread Stephen Eley
On Tue, Sep 22, 2009 at 8:24 AM, Aaron Gibralter wrote: > > I can get the dummy_app to work, but now I'm trying to figure out how to use > my Rails app. I'll keep playing around and see if I can come up with > anything. It sounds like you're trying to do integration testing (all the pieces of the

Re: [rspec-users] Am I on the right track?

2009-09-22 Thread Calvin
Hi Steve, I wrote the spec first and then the implementation. I think I could have written a better behavior description. I don't think the method name is as good or specific as it could be. I just wanted the class to be able to add two numbers... so maybe the specification could reflect that more

Re: [rspec-users] rspec-rails and rack middleware

2009-09-22 Thread Aaron Gibralter
Ah true, I definitely just realized that. The reason I was trying to use rails though was to provide endpoints for the calls passing through my middleware. For that though, I can just use the dummy app. Thank you! On Tue, Sep 22, 2009 at 10:25 AM, Stephen Eley wrote: > On Tue, Sep 22, 2009 at 8:

[rspec-users] Cucumber senario

2009-09-22 Thread Mithun Perera
Hi all, here is a scenario for create new Task Scenario: Create Valid Task Given I have no tasks And I am on the list of tasks When I follow "New Task" And I fill in "Description" with "Hello" And I press "Create" Then I should see "Task was successfully created." And I should see "H

Re: [rspec-users] Cucumber senario

2009-09-22 Thread David Chelimsky
On Tue, Sep 22, 2009 at 11:24 PM, Mithun Perera wrote: > Hi all, > here is a scenario for create new Task > > Scenario: Create Valid Task >  Given I have no tasks >  And I am on the list of tasks >  When I follow "New Task" >  And I fill in "Description" with "Hello" >  And I press "Create" >  The