Re: [rspec-users] Need Help

2009-09-21 Thread doug livesey
If you go to peepcode.com, they have some excellent resources on RSpec & Cucumber, and there is always The RSpec Book (from the pragmatic programmers).HTH, Doug. 2009/9/21 Mithun Perera > Hi all, > I am an university student and these days i am on training period. So i > want to know about ru

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

2009-09-21 Thread nruth
Sorry for the double post. Seems I haven't acquired the patience for mailing lists yet :) I had another idea which might scratch the itch, or might seem horrible: Take this example from some rails controller specs describe SiteImagesController, request = "get :index" do context "As a visitor:"

Re: [rspec-users] Incompatible version?

2009-09-21 Thread Jorge Martin
with: rspec (1.2.8, 1.1.12) rails (2.3.3, 2.3.2) rspec-rails (1.2.7.1, 1.1.12) cucumber (0.3.101, 0.3.100, 0.3.93, 0.3.92) and running the last selenium client it works -- Posted via http://www.ruby-forum.com/. ___ rspec-users mailing list

Re: [rspec-users] Need Help

2009-09-21 Thread nruth
If you want a quick intro it's worth looking on http://www.slideshare.net/ for some intro talks at the many Rails conventions that have been held recently. Try searching for cucumber or rspec and see what falls out. There are videos of presentations out there too, for example http://www.engineyard

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

2009-09-21 Thread Calvin
Hi, I am pretty new to RSpec and I wonder if some code I have written is leading me in the right direction. Any advice is greatly appreciated! here is the code from calculator.rb class Calculator def equation(val1, val2) result = val1 + val2 return result end end and here is the co

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

2009-09-21 Thread Zach Dennis
On Sun, Sep 20, 2009 at 8:34 PM, nruth wrote: > David > Thanks for the reply. > > I think I wasn't clear with my original post: before blocks work fine, > this is just a readability/comprehension/maintenance concern. > > We're using a describe (or context) block to name (or document) a > state, th

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

2009-09-21 Thread Zach Dennis
On Mon, Sep 21, 2009 at 8:56 AM, nruth wrote: > Sorry for the double post. Seems I haven't acquired the patience for > mailing lists yet :) > > I had another idea which might scratch the itch, or might seem > horrible: > > Take this example from some rails controller specs > > describe SiteImagesC

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

2009-09-21 Thread Stephen Eley
On Mon, Sep 21, 2009 at 5:48 PM, Calvin wrote: > > I am pretty new to RSpec and I wonder if some code I have written is > leading me in the right direction. Any advice is greatly appreciated! As a beginner exercise, this code looks perfectly functional to me. But I believe you left out the intere

[rspec-users] rspec-rails and rack middleware

2009-09-21 Thread Aaron Gibralter
It doesn't seem like my controller specs are calling my middleware on requests. Has anyone figured out a good way to test middlware with rspec? I'm thinking something like rails' rails/actionpack/test/controller/session/mem_cache_store_test.rb but with rspec... any thoughts? Thanks! Best, Aaron __

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

2009-09-21 Thread Stephen Eley
On Tue, Sep 22, 2009 at 12:22 AM, Aaron Gibralter wrote: > It doesn't seem like my controller specs are calling my middleware on > requests. Has anyone figured out a good way to test middlware with rspec? Rack::Test is your friend: http://github.com/brynary/rack-test If you Google it, there's a

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

2009-09-21 Thread Stephen Eley
On Sun, Sep 20, 2009 at 9:34 PM, nruth wrote: > > I think I wasn't clear with my original post: before blocks work fine, > this is just a readability/comprehension/maintenance concern. Peanut gallery: I personally find the separate "before" block clearer, more readable, and more aesthetically app

[rspec-users] Can you guys please check this blog about rspec + webrat + no cucumber

2009-09-21 Thread Vamsi Krishna
Hi all, We are new to rspec and webrat and we made some progress in using rspec + webrat with out cucumber, we posted a piece of code and hoping to get some comments from Rspec pros on our approach. Please let us know if there are better ways to solve the problem. http://www.spritle.com/blogs/?p=

Re: [rspec-users] Need Help

2009-09-21 Thread Mithun Perera
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 > tutorials for basic functionality of the cucumber and

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

2009-09-21 Thread Stephen Eley
On Sun, Sep 20, 2009 at 9:34 PM, nruth wrote: > > We're using a describe (or context) block to name (or document) a > state, then using a separate before block to set up that state > (context). If that before block were to go astray the documentation > would cease to be correct. On further readin