Re: [rspec-users] Sinitra and Cucumber

2009-02-26 Thread Andrew Premdas
Thanks Steve much appreciated :) 2009/2/26 Steve Tooky > > http://tooky.github.com/2009/02/05/getting-started-with-cucumber-and-sinatra.html > > Andrew Premdas wrote: > > Anyone using cucumber with sinitra (current). Wondering if I need to use > > Aslaks sinatra/webrat forks. Also if anyone has

Re: [rspec-users] [cucumber] Adding a file to support/ can break requires ordering

2009-02-26 Thread Ben Mabey
Randy Harmon wrote: Current code in cucumber prioritizes features/support/ files, but if I add another file in that location, then it can (sometimes) include that file first. Seems to depend on the number of files actually in the entire list being sorted, or something. I added a ticket for t

[rspec-users] [cucumber] Adding a file to support/ can break requires ordering

2009-02-26 Thread Randy Harmon
Current code in cucumber prioritizes features/support/ files, but if I add another file in that location, then it can (sometimes) include that file first. Seems to depend on the number of files actually in the entire list being sorted, or something. I added a ticket for this issue. http:/

Re: [rspec-users] [RSpec][RJS] Problem with specing create.rjs in controller_spec

2009-02-26 Thread Nick Hoffman
On 26/02/2009, at 11:25 AM, David Chelimsky wrote: On Thu, Feb 26, 2009 at 10:01 AM, Evgeny Bogdanov wrote: Could somebody please explain me what I am doing wrong. I am trying to spec create.rjs file, that is returned from my controller. render_template("create.rjs") works just fine, however

Re: [rspec-users] [cucumber] noob Q deleteing from a list.

2009-02-26 Thread Ben Mabey
Mark Wilden wrote: On Thu, Feb 26, 2009 at 7:59 AM, aslak hellesoy wrote: puts response.body Another debugging technique we use is When /^I view the response$/ do Tempfile.open("response") do |file| file.print response.body `open "file://#{file.path}"` sleep 2 end en

[rspec-users] A silent cucumber?

2009-02-26 Thread James Byrne
I believe that what I am trying to do should be possible, but I cannot seem to find the right combination of switches to get cucumber to run silently and only print the failing and pending steps. I do not have a cucumber.yml file I have tried the following (from the project root): $ cucumber -q

Re: [rspec-users] [cucumber] noob Q deleteing from a list.

2009-02-26 Thread Mark Wilden
On Thu, Feb 26, 2009 at 7:59 AM, aslak hellesoy wrote: > puts response.body Another debugging technique we use is When /^I view the response$/ do Tempfile.open("response") do |file| file.print response.body `open "file://#{file.path}"` sleep 2 end end ///ark ___

Re: [rspec-users] Run cucumber on a different DB than test?

2009-02-26 Thread Scott Taylor
On Feb 26, 2009, at 1:19 PM, Forrest Chang wrote: Hi all: Is it possible to run Rails Cucumber spec in a different DB than the test DB? I'd like to run the rspec and cucumber tests in parallel in my cc.rb build, and as it is now, I get MYSQL deadlocks on occasion. I could serialize the

[rspec-users] Run cucumber on a different DB than test?

2009-02-26 Thread Forrest Chang
Hi all: Is it possible to run Rails Cucumber spec in a different DB than the test DB? I'd like to run the rspec and cucumber tests in parallel in my cc.rb build, and as it is now, I get MYSQL deadlocks on occasion. I could serialize them, but I'd like the quicker feedback of running them in p

Re: [rspec-users] [Cucumber] Webrat / Watir - generating page images

2009-02-26 Thread Pat Nakajima
(I extracted the method in the Gist, so it may be a bit off) On Thu, Feb 26, 2009 at 12:21 PM, Pat Nakajima wrote: > Here's the step I use for taking screenshots: > https://gist.github.com/dff2a429afff1c212416. > > On Wed, Feb 25, 2009 at 10:49 PM, Arco wrote: >> I am using Cucumber with Webrat/

Re: [rspec-users] [Cucumber] Webrat / Watir - generating page images

2009-02-26 Thread Pat Nakajima
Here's the step I use for taking screenshots: https://gist.github.com/dff2a429afff1c212416. On Wed, Feb 25, 2009 at 10:49 PM, Arco wrote: > I am using Cucumber with Webrat/Watir/Celerity for UI testing. > > I would like to generate an error report which shows the page image > for each failed test

Re: [rspec-users] [RSpec][RJS] Problem with specing create.rjs in controller_spec

2009-02-26 Thread David Chelimsky
On Thu, Feb 26, 2009 at 10:01 AM, Evgeny Bogdanov wrote: > Could somebody please explain me what I am doing wrong. > I am trying to spec create.rjs file, that is returned from my > controller. > > render_template("create.rjs") works just fine, > > however have_rjs fails with the following error: >

Re: [rspec-users] [cucumber] noob Q deleteing from a list.

2009-02-26 Thread aslak hellesoy
On Thu, Feb 26, 2009 at 12:03 AM, John Ivanoff wrote: > manage_froobles.feature > -- >  Scenario: Delete frooble >    Given the following froobles: >      |name|color|description| >      |name 1|color 1|description 1| >      |name 2|color 2|description 2| >    

[rspec-users] [RSpec][RJS] Problem with specing create.rjs in controller_spec

2009-02-26 Thread Evgeny Bogdanov
Could somebody please explain me what I am doing wrong. I am trying to spec create.rjs file, that is returned from my controller. render_template("create.rjs") works just fine, however have_rjs fails with the following error: 'CommentsController while posting a comment renders a create.rjs templa

Re: [rspec-users] [cucumber] orphaned steps

2009-02-26 Thread Tim Walker
Hey thanks guys. Looks like that'll work. Tim On Thu, Feb 26, 2009 at 2:20 AM, Bart Zonneveld wrote: > > On 26-feb-2009, at 6:11, Aslak Hellesøy wrote: > >> >> >>> Any good way to find all orphaned steps? That is, any steps that exist >>> that do not match any features? >>> >> >> You can use RCov

[rspec-users] [Cucumber] Webrat / Watir - generating page images

2009-02-26 Thread Arco
I am using Cucumber with Webrat/Watir/Celerity for UI testing. I would like to generate an error report which shows the page image for each failed test. I believe I have read about this being done, but now I can't find any info online. Can someone please point me in the right direction?? Thanks

Re: [rspec-users] specing send_file

2009-02-26 Thread David Chelimsky
On Thu, Feb 26, 2009 at 7:13 AM, vo.x wrote: > On 25 Ún, 16:18, David Chelimsky wrote: >> On Wed, Feb 25, 2009 at 8:20 AM, vo.x wrote: >> > Aha, it seems that there is difference between behavior of Rails 2.1 >> > and 2.3. In Rails 2.1 stubbing works like a charm but it fails with >> > Rails 2.3

Re: [rspec-users] specing send_file

2009-02-26 Thread vo.x
On 25 Ún, 16:18, David Chelimsky wrote: > On Wed, Feb 25, 2009 at 8:20 AM, vo.x wrote: > > Aha, it seems that there is difference between behavior of Rails 2.1 > > and 2.3. In Rails 2.1 stubbing works like a charm but it fails with > > Rails 2.3 :/ > > That's a very general statement. Can you be

[rspec-users] [cucumber] noob Q deleteing from a list.

2009-02-26 Thread John Ivanoff
manage_froobles.feature -- Scenario: Delete frooble Given the following froobles: |name|color|description| |name 1|color 1|description 1| |name 2|color 2|description 2| |name 3|color 3|description 3| |name 4|color 4|description

Re: [rspec-users] Sinitra and Cucumber

2009-02-26 Thread aslak hellesoy
On Thu, Feb 26, 2009 at 1:27 PM, Steve Tooky wrote: > http://tooky.github.com/2009/02/05/getting-started-with-cucumber-and-sinatra.html > Rob Holland updated the wiki yesterday: http://wiki.github.com/aslakhellesoy/cucumber/sinatra (He reports that the $0 trick described in the blog doesn't work

Re: [rspec-users] Sinitra and Cucumber

2009-02-26 Thread Steve Tooky
http://tooky.github.com/2009/02/05/getting-started-with-cucumber-and-sinatra.html Andrew Premdas wrote: > Anyone using cucumber with sinitra (current). Wondering if I need to use > Aslaks sinatra/webrat forks. Also if anyone has a sample app :) -- Posted via http://www.ruby-forum.com/. __

Re: [rspec-users] [cucumber] orphaned steps

2009-02-26 Thread Bart Zonneveld
On 26-feb-2009, at 6:11, Aslak Hellesøy wrote: Any good way to find all orphaned steps? That is, any steps that exist that do not match any features? You can use RCov. Something like this'll do the trick: http://gist.github.com/70747 cheers, bartz ___

Re: [rspec-users] How to mock an object defined in the before_filter function?

2009-02-26 Thread Evgeny Bogdanov
Thanks a lot Pat for clear and detailed explanations. My initial vision was that I don't change code and do all the manipulations in spec files. Now I understand that it is not really what I should be doing. I should take into account both, and adapt one to another to improve clarity and briefness