Re: [rspec-users] Depot app, Demeter's law and troubles cleanly spe cing

2009-04-21 Thread Steve Schafer
On Mon, 20 Apr 2009 12:40:08 -0700, you wrote: I wrote a blog post that may be helpful. http://www.patmaddox.com/blog/demeter-is-for-encapsulation Basically, when you have structural objects as in this case, demeter isn't useful. That's a good example as far as it goes, but I think it makes a

Re: [rspec-users] [cucumber, jruby, windows] - What are you cucumber windows users using for ANSII color in your consoles?

2009-04-21 Thread aslak hellesoy
Not really a cucumber question, but I'm not seeing ansi colors on a Windows XP consoles. Some googling around says that windows consoles don't support ansii color codes. If this is the case, what are you windows cucumber folks using? MRI or JRuby? RSpec or Cucumber? What versions? (I'm

[rspec-users] [Cucumber] Tables

2009-04-21 Thread aslak hellesoy
Being the author of Cucumber, some of you might be surprised that I ask this question: How should I go about to implement a Cucumber feature and step definition with the following data? http://gist.github.com/99220 (just look at the first file for now) Imagine I'm opening a restaurant where

Re: [rspec-users] [Cucumber] Tables

2009-04-21 Thread Joseph Wilk
aslak hellesoy wrote: Being the author of Cucumber, some of you might be surprised that I ask this question: How should I go about to implement a Cucumber feature and step definition with the following data? http://gist.github.com/99220 (just look at the first file for now) Imagine I'm

Re: [rspec-users] [Cucumber] Tables

2009-04-21 Thread Jonathan Linowes
Without adding a new feature to Cucumber, I'd probably do Scenario Outline: Religious menus Given the customer is a Religion When they ask for the menu Then they should be presented with Meats Examples: | Religion | Meats | | Christian | Pork, Lamb, Veal | | Jewish

Re: [rspec-users] [Cucumber] Tables

2009-04-21 Thread Jonathan Linowes
On Apr 21, 2009, at 1:57 PM, Joseph Wilk wrote: What you really want is an examples table that is embedded in a step (different from a step table, maybe by keyword?) that causes the step to be run multiple times for each of the values. So rather than using placeholders we embedded a

Re: [rspec-users] [Cucumber] Tables

2009-04-21 Thread Joseph Wilk
On Tue, Apr 21, 2009 at 7:32 PM, Jonathan Linowes jonat...@parkerhill.com wrote: On Apr 21, 2009, at 1:57 PM, Joseph Wilk wrote: What you really want is an examples table that is embedded in a step (different from a step table, maybe by keyword?) that causes the step to be run multiple times

Re: [rspec-users] [Cucumber] Tables

2009-04-21 Thread aslak hellesoy
On Tue, Apr 21, 2009 at 10:20 PM, Joseph Wilk j...@josephwilk.net wrote: On Tue, Apr 21, 2009 at 7:32 PM, Jonathan Linowes jonat...@parkerhill.com wrote: On Apr 21, 2009, at 1:57 PM, Joseph Wilk wrote: What you really want is an examples table that is embedded in a step (different

Re: [rspec-users] [Cucumber] Tables

2009-04-21 Thread Matt Wynne
On 21 Apr 2009, at 22:13, aslak hellesoy wrote: On Tue, Apr 21, 2009 at 10:20 PM, Joseph Wilk j...@josephwilk.net wrote: On Tue, Apr 21, 2009 at 7:32 PM, Jonathan Linowes jonat...@parkerhill.com wrote: On Apr 21, 2009, at 1:57 PM, Joseph Wilk wrote: What you really want is an examples

Re: [rspec-users] [Cucumber] Tables

2009-04-21 Thread aslak hellesoy
On Tue, Apr 21, 2009 at 8:50 PM, Jonathan Linowes jonat...@parkerhill.comwrote: Without adding a new feature to Cucumber, I'd probably do Scenario Outline: Religious menus Given the customer is a Religion When they ask for the menu Then they should be presented with Meats Examples:

Re: [rspec-users] [Cucumber] Tables

2009-04-21 Thread Ben Mabey
aslak hellesoy wrote: On Tue, Apr 21, 2009 at 10:20 PM, Joseph Wilk j...@josephwilk.net mailto:j...@josephwilk.net wrote: On Tue, Apr 21, 2009 at 7:32 PM, Jonathan Linowes jonat...@parkerhill.com mailto:jonat...@parkerhill.com wrote: On Apr 21, 2009, at 1:57 PM, Joseph

Re: [rspec-users] [Cucumber] Tables

2009-04-21 Thread Nigel Thorne
Here is the same thing as a gist http://gist.github.com/99443 2009/4/22 Nigel Thorne rs...@nigelthorne.com I would prefer it to be explicit what columns I am using, that way if you have two steps that require this technique in your scenario it still works.Relying on an implicit 'the rest'

Re: [rspec-users] [Cucumber] Tables

2009-04-21 Thread Jonathan Linowes
no offense to anyone here but all this is starting to remind me of the days of green ASCII terminals... there's a reason gui's, wysiwyg editors and typographic fonts were invented... ok, nevermind, back to plain text, proportional font, character chart art :) On Apr 21, 2009, at

[rspec-users] Why RSpec?

2009-04-21 Thread Amos King
I like Shoulda. Sometimes I like plain old Test::Unit. Cucumber gives me a different thought process. I'd just like to hear some thoughts on why RSpec? What does it buy me that I can't get with Shoulda? I just can't seem to think in RSpec. Where is there a good example of RSpec tests that

Re: [rspec-users] How to get stacktrace for extending Ruby in C

2009-04-21 Thread Newb Newb
Scott Taylor wrote: Newb Newb wrote: Hi I extend ruby with C . i get error like segmentation fault when i call my client.rb how can i get the stacktrace ? You can use gdb to get a stack trace, as was documented by Mauricio, Jamis, and Why a while back. Not sure what this has to

Re: [rspec-users] [Cucumber] Tables

2009-04-21 Thread David Chelimsky
On Tue, Apr 21, 2009 at 11:39 AM, aslak hellesoy aslak.helle...@gmail.com wrote: Being the author of Cucumber, some of you might be surprised that I ask this question: How should I go about to implement a Cucumber feature and step definition with the following data?

Re: [rspec-users] [cucumber, jruby, windows] - What are you cucumber windows users using for ANSIIcolor in your consoles?

2009-04-21 Thread Colfer, Brian
First ... get the win32console gem. Also you want to at least change the character set for the particular window using the command: chcp 1252 It works fine for me ... Cheers --- Brian Colfer From: rspec-users-boun...@rubyforge.org

Re: [rspec-users] [Cucumber] Tables

2009-04-21 Thread Jonathan Linowes
the output would be weird, eg Then he should see pork selections if And he should see lamb selections if Y And he should see veal selections if On Apr 21, 2009, at 2:17 PM, Aaron VonderHaar wrote: I think the scenario outline is the way to go, but in your example it's not clear to

[rspec-users] [Cucumber] Options in tables

2009-04-21 Thread Nigel Thorne
In Cucumber I want to remove duplication from my examples tables. see http://gist.github.com/99516 for an example of the type of situation I am facing. I would like the second example to be equivalent to the first. To do this... I need cucumber to read a row in the examples and notice the

Re: [rspec-users] Mocking: brittle specs and tight coupling?

2009-04-21 Thread Ashley Moran
On 12 Apr 2009, at 05:19, Phlip wrote: There's a third alternative: Your sliding scale is really a pyramid with a peak. The third alternative is you never _need_ to mock, yet both your tests and target code are highly decoupled. _That_ is the goal. Under TDD, you get that by avoiding a

Re: [rspec-users] How to get stacktrace for extending Ruby in C

2009-04-21 Thread Ben Mabey
Newb Newb wrote: Scott Taylor wrote: Newb Newb wrote: Hi I extend ruby with C . i get error like segmentation fault when i call my client.rb how can i get the stacktrace ? You can use gdb to get a stack trace, as was documented by Mauricio, Jamis, and Why a while back.

[rspec-users] RSpec and Selenium automation of an application

2009-04-21 Thread Saturn
Hi All, I am new to rspec and I am using selenium with Rspec1.2.4, I have gone through describe, and it methods etc. I am automating an application which contains many testsuites and test methods. my question is 1. Should i write one describe method corresponding to one testsuite ??? And one

[rspec-users] Tests for my gem cannot find classes in gems lib directory ..

2009-04-21 Thread Anthony Broad-Crawford
I am writing a gem and using RSpec to drive my development. However, whenever I describe a class within the gems lib I get an uninitialized constant error. I am placing my folder structure, spec.rake and first spec below. I feel I must be missing something obvious. Additionally, I did

Re: [rspec-users] Cucumber - step negating another expecting step

2009-04-21 Thread Mark Anderson
I've been doing something similar. I think the benefit of having half the steps(each can be negated) wins over the small impact it has on step readability. Personally I started adding stuff like this(perhaps not as DRY but simple enough): Then /^the correspondence should (not )?have