[rspec-users] Object equality with a DSL

2007-08-06 Thread Scott Taylor
How would you spec a DSL which descends from Jim Weirich's Blank Slate? I'm asking this question because I have written a DSL, and would like to have the DSL class descend from BlankSlate so that methods like == are not available in the DSL itself (in production), but only while Testing. D

Re: [rspec-users] used the described Class in a shared behavior

2007-08-06 Thread David Chelimsky
On 8/6/07, David Chelimsky <[EMAIL PROTECTED]> wrote: > On 8/6/07, [EMAIL PROTECTED] <[EMAIL PROTECTED]> wrote: > > Is it possible to access the described class in a shared behavior? I'm > > trying to do something like this: > > > > describe "Siberian feline", :shared => true do > > described_cla

Re: [rspec-users] used the described Class in a shared behavior

2007-08-06 Thread David Chelimsky
On 8/6/07, [EMAIL PROTECTED] <[EMAIL PROTECTED]> wrote: > Is it possible to access the described class in a shared behavior? I'm > trying to do something like this: > > describe "Siberian feline", :shared => true do > described_class_instance_as :feline, :name => "fluffy", :breed => > "Siberian"

[rspec-users] used the described Class in a shared behavior

2007-08-06 Thread ben
Is it possible to access the described class in a shared behavior? I'm trying to do something like this: describe "Siberian feline", :shared => true do described_class_instance_as :feline, :name => "fluffy", :breed => "Siberian" # or maybe before(:all) do @feline = described_class.new(

Re: [rspec-users] Problems with array mock

2007-08-06 Thread David Chelimsky
On 8/6/07, aslak hellesoy <[EMAIL PROTECTED]> wrote: > @curr_odontogram.photos.should_receive(:[]).with(1).and_return(@photo) > > Aslak D'oh! Of course - that should do it. ___ rspec-users mailing list rspec-users@rubyforge.org http://rubyforge.org/mailm

Re: [rspec-users] Problems with array mock

2007-08-06 Thread aslak hellesoy
On 8/6/07, Gaston Ramos <[EMAIL PROTECTED]> wrote: > El lun, 06 de ago de 2007, a las 11:52:28 -0500, David Chelimsky dijo: > > On 8/6/07, Gaston Ramos <[EMAIL PROTECTED]> wrote: > > > > > > Hi everyone, > > > > > > I'm trying this in my helper spec and it didn't work: > > > > > > @curr_odontogram.

Re: [rspec-users] Problems with array mock

2007-08-06 Thread Gaston Ramos
El lun, 06 de ago de 2007, a las 11:52:28 -0500, David Chelimsky dijo: > On 8/6/07, Gaston Ramos <[EMAIL PROTECTED]> wrote: > > > > Hi everyone, > > > > I'm trying this in my helper spec and it didn't work: > > > > @curr_odontogram.should_receive('photos[1]').and_return(@photo) > > > > and the erro

Re: [rspec-users] Problems with array mock

2007-08-06 Thread David Chelimsky
On 8/6/07, Gaston Ramos <[EMAIL PROTECTED]> wrote: > > Hi everyone, > > I'm trying this in my helper spec and it didn't work: > > @curr_odontogram.should_receive('photos[1]').and_return(@photo) > > and the error is: > > SyntaxError in 'PersonHelper Deberia devolverme un link para eliminar una > fo

[rspec-users] Problems with array mock

2007-08-06 Thread Gaston Ramos
Hi everyone, I'm trying this in my helper spec and it didn't work: @curr_odontogram.should_receive('photos[1]').and_return(@photo) and the error is: SyntaxError in 'PersonHelper Deberia devolverme un link para eliminar una foto' compile error /home/gramos/src/rails/r-dental/config/../vendor/pl

Re: [rspec-users] Specifying custom rails FormBuilders

2007-08-06 Thread Jay Levitt
David Chelimsky wrote: > On 8/6/07, Jay Levitt <[EMAIL PROTECTED]> wrote: >> I want to write a spec for a custom form builder, but I'm not really >> sure where it should live or how to include the right rspec_on_rails >> contexts. Ideally, I should be able to write a spec like: >> >> >> describe L

Re: [rspec-users] Specifying custom rails FormBuilders

2007-08-06 Thread David Chelimsky
On 8/6/07, Jay Levitt <[EMAIL PROTECTED]> wrote: > I want to write a spec for a custom form builder, but I'm not really > sure where it should live or how to include the right rspec_on_rails > contexts. Ideally, I should be able to write a spec like: > > > describe LabelledBuilder do > > it "sho

[rspec-users] Specifying custom rails FormBuilders

2007-08-06 Thread Jay Levitt
I want to write a spec for a custom form builder, but I'm not really sure where it should live or how to include the right rspec_on_rails contexts. Ideally, I should be able to write a spec like: describe LabelledBuilder do it "should let me create a text field" do object = mock(object

Re: [rspec-users] pending w/ no string

2007-08-06 Thread David Chelimsky
On 8/6/07, Scott Taylor <[EMAIL PROTECTED]> wrote: > > On Aug 6, 2007, at 7:19 AM, David Chelimsky wrote: > > > On 8/6/07, Scott Taylor <[EMAIL PROTECTED]> wrote: > >> > >> Is there some reason that pending() *MUST* take an argument? > > > > There was no discussion of this when the feature was cont

Re: [rspec-users] pending w/ no string

2007-08-06 Thread Scott Taylor
On Aug 6, 2007, at 7:19 AM, David Chelimsky wrote: > On 8/6/07, Scott Taylor <[EMAIL PROTECTED]> wrote: >> >> Is there some reason that pending() *MUST* take an argument? > > There was no discussion of this when the feature was contributed. > Thinking about it now, to allow for no arg would requi

Re: [rspec-users] pending w/ no string

2007-08-06 Thread David Chelimsky
On 8/6/07, Scott Taylor <[EMAIL PROTECTED]> wrote: > > Is there some reason that pending() *MUST* take an argument? There was no discussion of this when the feature was contributed. Thinking about it now, to allow for no arg would require good default messages - one for when there is a block and o