Re: [rspec-users] Why RSpec?

2009-04-21 Thread Saturn
I am also having same question that i can't find the reason why i should go for RSpec instead of Test/Unit. There is no compelling reason / advantage offered by RSpec except semantics. Is RSpec all about different syntax??? Thanks in advance for clarifying it??? _

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

2009-04-21 Thread aslak hellesoy
2009/4/17 Lenny Marks > 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

Re: [rspec-users] [Cucumber] Tables

2009-04-21 Thread aslak hellesoy
On Tue, Apr 21, 2009 at 6:56 PM, David Chelimsky wrote: > On Tue, Apr 21, 2009 at 11:39 AM, 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 >

Re: [rspec-users] [Cucumber] Tables

2009-04-21 Thread aslak hellesoy
On Wed, Apr 22, 2009 at 2:27 AM, Jonathan Linowes wrote: > 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 fon

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 (no

[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 o

[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 it(

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. No

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 des

[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 'option

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

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 [mailto:rspec-users-boun

Re: [rspec-users] [Cucumber] Tables

2009-04-21 Thread David Chelimsky
On Tue, Apr 21, 2009 at 11:39 AM, 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 t

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 s

[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 will

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 6:50

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 > 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' doesn't work in that

Re: [rspec-users] [Cucumber] Tables

2009-04-21 Thread Nigel Thorne
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' doesn't work in that situation. In my scenario I would like to have something like this.. Given I am logged in as

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 > wrote: On Tue, Apr 21, 2009 at 7:32 PM, Jonathan Linowes mailto:jonat...@parkerhill.com>> wrote: > > On Apr 21, 2009, at 1:57 PM, Joseph Wilk wrote: > >> What you really w

Re: [rspec-users] [Cucumber] Tables

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

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 wrote: On Tue, Apr 21, 2009 at 7:32 PM, Jonathan Linowes 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 >>

Re: [rspec-users] [Cucumber] Tables

2009-04-21 Thread aslak hellesoy
On Tue, Apr 21, 2009 at 10:20 PM, Joseph Wilk wrote: > On Tue, Apr 21, 2009 at 7:32 PM, Jonathan Linowes > 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 keyw

Re: [rspec-users] [Cucumber] Tables

2009-04-21 Thread Joseph Wilk
On Tue, Apr 21, 2009 at 7:32 PM, Jonathan Linowes 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 for each of th

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 Exampl

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 "" When they ask for the menu Then they should be presented with "" Examples: | Religion | Meats | | Christian | Pork, Lamb, Veal | | Jewish|L

Re: [rspec-users] [Cucumber] Tables

2009-04-21 Thread Aaron VonderHaar
I think the scenario outline is the way to go, but in your example it's not clear to me what the behavior is supposed to be-- is the expected output in your Then statement really providing value? Here's my take on it: http://gist.github.com/99281 Scenario Outline: Religious menus Given th

Re: [rspec-users] [Cucumber] Tables

2009-04-21 Thread Matt Wynne
On 21 Apr 2009, at 17:39, 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 fi

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 openi

[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 custo

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'

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

2009-04-21 Thread John Goodsen
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? thanks, -- John Goodsen RADSoft / Better Soft

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

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

2009-04-21 Thread Scott Taylor
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 do with rspec, though. Sco

Re: [rspec-users] Controller spec: testing that scope is set

2009-04-21 Thread Zach Dennis
On Tue, Apr 21, 2009 at 4:02 AM, Michael Schuerig wrote: > On Monday 20 April 2009, Zach Dennis wrote: >> > I don't agress. Both classes have distinct, although related >> > purposes. RequestCondition implements the translation from request >> > parameters to #find-options. QueryScope(Builder) fit

Re: [rspec-users] How would I spec this? --Rails subscriptions

2009-04-21 Thread Colfer, Brian
Thanks Matt I'm fairly comfortable with cucumber and I have the acceptance tests. I'm looking to see if I can follow through on the BDD process. Sent from Brian's iPhone On Apr 21, 2009, at 12:27 AM, "Matt Wynne" wrote: On 21 Apr 2009, at 00:34, Colfer, Brian wrote: I have a set of

Re: [rspec-users] Controller spec: testing that scope is set

2009-04-21 Thread Michael Schuerig
On Monday 20 April 2009, Zach Dennis wrote: > > I don't agress. Both classes have distinct, although related > > purposes. RequestCondition implements the translation from request > > parameters to #find-options. QueryScope(Builder) fits it in with > > ActionController and adds syntactic sugar. The

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

2009-04-21 Thread Newb Newb
Hi I extend ruby with C . i get error like segmentation fault when i call my client.rb how can i get the stacktrace ? Pls help me out Thanks -- Posted via http://www.ruby-forum.com/. ___ rspec-users mailing list rspec-users@rubyforge.org http://rub

Re: [rspec-users] How would I spec this? --Rails subscriptions

2009-04-21 Thread Matt Wynne
On 21 Apr 2009, at 00:34, Colfer, Brian wrote: I have a set of users And a set of things … podcasts Users should get a page that shows all of the podcassts with a check box If they are subscribed then the check box is checked Users table has first_name, last_name, user_name Podcats table h