[rspec-users] newbie cucumber tutorial

2008-12-22 Thread Sarah Allen
I got started with cucumber and it sure is fun. I've written up my initial experience in tutorial format here for any newbies who want to follow in my tracks: http://www.ultrasaurus.com/code/2008/12/rails-2-day-3.html If anyone has any corrections, let me know. I was wondering whether when

Re: [rspec-users] newbie cucumber tutorial

2008-12-22 Thread Matt Wynne
Great stuff. One thing I'd point out is the missing (and extremely important) step 3.5 in Rick Denatale's TDD steps: *Refactor to remove duplication*. Not that there's any refactoring necessary in your example, but it's always worth reminding people they should check for it. On 22 Dec

Re: [rspec-users] newbie cucumber tutorial

2008-12-22 Thread aslak hellesoy
On Mon, Dec 22, 2008 at 10:01 AM, Sarah Allen li...@ruby-forum.com wrote: I got started with cucumber and it sure is fun. I've written up my initial experience in tutorial format here for any newbies who want to follow in my tracks: http://www.ultrasaurus.com/code/2008/12/rails-2-day-3.html

Re: [rspec-users] Cucumber logo poll is open

2008-12-22 Thread Zach Dennis
Daniel Lopes / Dan Ryan, Can you combine the cucumber in Dan Ryan's B logo with Daniel's font / shadowing from his A B ? Zach On Sat, Dec 20, 2008 at 6:41 PM, aslak hellesoy aslak.helle...@gmail.com wrote: Cast your ballots! http://cukes.info/

Re: [rspec-users] Cucumber logo poll is open

2008-12-22 Thread aslak hellesoy
On Mon, Dec 22, 2008 at 2:01 PM, Zach Dennis zach.den...@gmail.com wrote: Daniel Lopes / Dan Ryan, Can you combine the cucumber in Dan Ryan's B logo with Daniel's font / shadowing from his A B ? 170 people have voted already. Adding a new logo to the poll now would mess everything up.

Re: [rspec-users] newbie cucumber tutorial

2008-12-22 Thread Sarah Allen
Aslak Hellesøy wrote: * I released 0.1.13 yesterday. In the Rails installation wiki page I recommend using my webrat gem. It lets you use response.should have_selector(...) (You're not using it in your tutorial, but just in case...) Luckily I started with cucumber on Sunday just after your

Re: [rspec-users] newbie cucumber tutorial

2008-12-22 Thread aslak hellesoy
On Mon, Dec 22, 2008 at 5:59 PM, Sarah Allen li...@ruby-forum.com wrote: Aslak Hellesøy wrote: * I released 0.1.13 yesterday. In the Rails installation wiki page I recommend using my webrat gem. It lets you use response.should have_selector(...) (You're not using it in your tutorial, but

Re: [rspec-users] newbie cucumber tutorial

2008-12-22 Thread Sarah Allen
I realize this is off-topic for the RSpec forum and cucumber tutorial, but I'm hoping you'll enlighten me on this point which is, I guess, more of a Ruby language question... Aslak Hellesøy wrote: As you can see from my series of blog posts, I'm new to Ruby and Rails. I thought that ending a

Re: [rspec-users] newbie cucumber tutorial

2008-12-22 Thread Caius Durling
On 22 Dec 2008, at 17:18, aslak hellesoy wrote: Essentially, #create will never raise an error no matter what you pass it, and you actually want exceptions for bad input in your tests (step definitions). Therefore - use #create! (or #save!). In your app, use the non-bang methods. Use

Re: [rspec-users] newbie cucumber tutorial

2008-12-22 Thread aslak hellesoy
On Mon, Dec 22, 2008 at 8:09 PM, Sarah Allen li...@ruby-forum.com wrote: I realize this is off-topic for the RSpec forum and cucumber tutorial, but I'm hoping you'll enlighten me on this point which is, I guess, more of a Ruby language question... Aslak Hellesøy wrote: As you can see from

[rspec-users] [cucumber] automation and historical

2008-12-22 Thread Tim Walker
Hi guys, Can someone point me to information regarding: 1) running cucumber as an automated task decoupled from CI. Assuming cron or similar. 2) parsing and storing results so they can be graphed, etc. Many thanks in advance, Tim ___ rspec-users

Re: [rspec-users] [cucumber] automation and historical

2008-12-22 Thread Tim Walker
Hate to glom on...I was curious about the exit status from cucumber... I did a rake features to a log file and this is the last bit: 35 steps passed 2 steps failed 4 steps skipped 1 steps pending exit status was 0 (echo $?) Do you guys parse this from the log or what? Many thanks, Tim On

Re: [rspec-users] [cucumber] automation and historical

2008-12-22 Thread Pat Maddox
On Mon, Dec 22, 2008 at 11:52 AM, Tim Walker walke...@gmail.com wrote: Hi guys, Can someone point me to information regarding: 1) running cucumber as an automated task decoupled from CI. Assuming cron or similar. 2) parsing and storing results so they can be graphed, etc. Many thanks in

Re: [rspec-users] [cucumber] automation and historical

2008-12-22 Thread John Goodsen
what kind of graphs are you thinking? Can they be plugged into rcumber? On Mon, Dec 22, 2008 at 3:01 PM, Pat Maddox perg...@gmail.com wrote: On Mon, Dec 22, 2008 at 11:52 AM, Tim Walker walke...@gmail.com wrote: Hi guys, Can someone point me to information regarding: 1) running

Re: [rspec-users] newbie cucumber tutorial

2008-12-22 Thread Pat Maddox
On Mon, Dec 22, 2008 at 11:29 AM, Caius Durling ca...@caius.name wrote: On 22 Dec 2008, at 17:18, aslak hellesoy wrote: Essentially, #create will never raise an error no matter what you pass it, and you actually want exceptions for bad input in your tests (step definitions). Therefore - use

[rspec-users] [cucumber] screenshot upon exception

2008-12-22 Thread aidy lewis
Hi, I am using Cucumber in combination with tests that drive the actual browser. Is there a place where I can easily trap an exception and take a screenshot of the browser? Regards Aidy ___ rspec-users mailing list rspec-users@rubyforge.org

Re: [rspec-users] calling multiline steps from other steps

2008-12-22 Thread Pau Cor
Aslak Hellesøy wrote: And please link to this thread in the ticket. Nabble or somesuch. I am sorry for taking so long to post the ticket: http://rspec.lighthouseapp.com/projects/16211-cucumber/tickets/144-call-multiline-steps-from-other-steps -- Posted via http://www.ruby-forum.com/.

Re: [rspec-users] [cucumber] screenshot upon exception

2008-12-22 Thread aslak hellesoy
On Mon, Dec 22, 2008 at 9:46 PM, aidy lewis aidy.le...@googlemail.comwrote: Hi, I am using Cucumber in combination with tests that drive the actual browser. Is there a place where I can easily trap an exception and take a screenshot of the browser?

Re: [rspec-users] [cucumber] automation and historical

2008-12-22 Thread aslak hellesoy
On Mon, Dec 22, 2008 at 8:55 PM, Tim Walker walke...@gmail.com wrote: Hate to glom on...I was curious about the exit status from cucumber... I did a rake features to a log file and this is the last bit: 35 steps passed 2 steps failed 4 steps skipped 1 steps pending exit status was 0

Re: [rspec-users] newbie cucumber tutorial

2008-12-22 Thread Steve Molitor
+1 @ Pat I was going to respond in more detail, but I do exactly what Pat does -- bang in steps, no bang in Rails apps. The Rails scaffolding boiler plate generates no bangs. Steve On Mon, Dec 22, 2008 at 2:30 PM, Pat Maddox perg...@gmail.com wrote: On Mon, Dec 22, 2008 at 11:29 AM, Caius

Re: [rspec-users] newbie cucumber tutorial

2008-12-22 Thread Sarah Allen
You guys are awesome. For posterity, I've written up a bit about the bang vs. non-bang as an aside in the tutorial: http://www.ultrasaurus.com/code/2008/12/rails-2-day-3.html#syntax I'll have to read up on modules. (I've only just finished ch 3 of the humble ruby book.) Oddly, I didn't see

Re: [rspec-users] newbie cucumber tutorial

2008-12-22 Thread Caius Durling
On 22 Dec 2008, at 22:57, Sarah Allen wrote: Oddly, I didn't see any content to the post by Caius Durling via ruby-forum ( http://www.ruby-forum.com/topic/174015?reply_to=762550#762530 ) How weird, wonder if its because I signed the email with my GPG key. Have sent this one unsigned so

[rspec-users] understanding within

2008-12-22 Thread Sarah Allen
So, I want to test clicking a link in a table and found this handy example by Aslak: http://github.com/aslakhellesoy/cucumber_rails/tree/master/features/step_definitions/lorry_steps.rb When /^I delete the (\d+)(?:st|nd|rd|th) lorry$/ do |pos| visit lorries_url within(table

Re: [rspec-users] Cucumber logo poll is open

2008-12-22 Thread Tim Walker
It was sweet too. I know my favorite and why. Not sure I can talk about it though! 8) T On Mon, Dec 22, 2008 at 6:07 AM, aslak hellesoy aslak.helle...@gmail.com wrote: On Mon, Dec 22, 2008 at 2:01 PM, Zach Dennis zach.den...@gmail.com wrote: Daniel Lopes / Dan Ryan, Can you combine the

Re: [rspec-users] [cucumber] automation and historical

2008-12-22 Thread Tim Walker
Hi Aslak, Yes, that produced 1. I'll try it again tomorrow. So, if anything fails the error code will be not 0. Is it always 1 or the number of failing tests or anything else? Thanks again, Tim On Mon, Dec 22, 2008 at 2:04 PM, aslak hellesoy aslak.helle...@gmail.com wrote: On Mon, Dec 22,

Re: [rspec-users] [cucumber] automation and historical

2008-12-22 Thread Tim Walker
The standard stuff, number of tests, passing, by type, daily results summary...things that show a consistent attention to test automation. Let me play with rcumber. Thanks, Tim On Mon, Dec 22, 2008 at 1:27 PM, John Goodsen jgood...@radsoft.com wrote: what kind of graphs are you thinking? Can

Re: [rspec-users] [cucumber] automation and historical

2008-12-22 Thread Aslak Hellesøy
Den 23. des.. 2008 kl. 01.46 skrev Tim Walker walke...@gmail.com: Hi Aslak, Yes, that produced 1. I'll try it again tomorrow. So, if anything fails the error code will be not 0. Is it always 1 or the number of failing tests or anything else? Always 1, but I like your idea. Thanks again

Re: [rspec-users] understanding within

2008-12-22 Thread Jeremiah Heller
On 22 Dec 2008, at 16:03, Sarah Allen wrote: Could someone describe what table tr:nth-child(#{pos.to_i+1}) does? by semantic pattern matching I could guess that ol li:nth-child(#{pos.to_i+1}) would also work, but it would be nifty to know why. Thanks, Sarah Hi Sarah - et al, I'm a newb