Re: [rspec-users] Newbie question

2007-11-27 Thread Pat Maddox
On 11/27/07, Pito Salas <[EMAIL PROTECTED]> wrote: > That *was* the whole file. And I think therein lies the problem. Wait, so your file had "..." in it? Yes, that would indeed be a syntax error. Pat ___ rspec-users mailing list rspec-users@rubyforge.o

Re: [rspec-users] Newbie question

2007-11-27 Thread Pito Salas
That *was* the whole file. And I think therein lies the problem. I didn't realize that I needed a class def for Acct. So this, now, works: class Account end describe Account, " when first created" do it "should have a balance of $0" do end end (as I said: newbie :) Thanks! Pito _

Re: [rspec-users] Newbie question

2007-11-27 Thread Daniel N
On Nov 28, 2007 11:58 AM, Pito Salas <[EMAIL PROTECTED]> wrote: > I installed Rspec and am getting the following failure: > > $ sudo gem install rspec > Successfully installed rspec-1.0.8 > Installing ri documentation for rspec-1.0.8... > Installing RDoc documentation for rspec-1.0.8... > > $ spec

[rspec-users] Newbie question

2007-11-27 Thread Pito Salas
I installed Rspec and am getting the following failure: $ sudo gem install rspec Successfully installed rspec-1.0.8 Installing ri documentation for rspec-1.0.8... Installing RDoc documentation for rspec-1.0.8... $ spec -v RSpec-1.0.8 (r2338) - BDD for Ruby http://rspec.rubyforge.org/ $ cat acct.

Re: [rspec-users] Expectations on Class Methods

2007-11-27 Thread s.ross
On Nov 27, 2007, at 12:23 PM, Scott Taylor wrote: > Or, you could also do some sort of behaviour verification. What do > you expect this DatabaseMapper setup should do? Why is it in your > code? If you can answer these questions, then you can probably write > a test for it (but without stubbing

Re: [rspec-users] Expectations on Class Methods

2007-11-27 Thread Scott Taylor
On Nov 27, 2007, at 3:13 PM, s.ross wrote: > Sorry about the non-specific subject. Here's what I'm trying to do. I > have a method: > > DataMapper::Database.setup > > That I want to create an expectation on. I wrote: > > DataMapper::Database.should_receive(:setup).once.and_return > (connection_ha

[rspec-users] Expectations on Class Methods

2007-11-27 Thread s.ross
Sorry about the non-specific subject. Here's what I'm trying to do. I have a method: DataMapper::Database.setup That I want to create an expectation on. I wrote: DataMapper::Database.should_receive(:setup).once.and_return (connection_hash) The call to setup is invoked in the "Object" namespa

Re: [rspec-users] Assumption tests

2007-11-27 Thread Daniel Tenner
Just thought I'd post an update on this, since I promised Pat that I would :-) Ultra-detailed, "pure behaviour/interaction" specs the way I wanted to do them has turned out to be unproductive in the long run. The specs are too complex to write, and too hard to read, and the lack of refacto