[rspec-users] getting autotest to monitor changes in lib directory

2008-03-28 Thread Joe Van Dyk
Autotest monitors changes in app/models. How can I get autotest to monitor changes in lib? So that whenever something changes in lib or specs/lib, it runs the appropriate spec? Joe ___ rspec-users mailing list rspec-users@rubyforge.org http://rubyforge

Re: [rspec-users] help Steven Baker get to Scotland on Rails

2008-03-28 Thread Scott Taylor
On Mar 28, 2008, at 11:01 AM, David Chelimsky wrote: > Hi all, > > Warning - this is a request for money to help do something nice for > someone. If this offends you in any way, please stop reading now and > just delete this email. > > Steven Baker, the guy who actually wrote RSpec to begin with

Re: [rspec-users] What is SpecServer?

2008-03-28 Thread Scott Taylor
On Mar 28, 2008, at 2:35 PM, David Beckwith wrote: > I guess I could just try it, but does spec_server work with > autotest too? > > ie. > ruby script/spec_server & > autotest > Sure. Autotest is a pretty stupid program (and I mean that in a good way). All it does is periodically run a sp

Re: [rspec-users] How do you mock an object that you don't have access to?

2008-03-28 Thread David Beckwith
Awesome. Thank you. David :) On Fri, Mar 28, 2008 at 11:32 AM, Luis Lavena <[EMAIL PROTECTED]> wrote: > On Fri, Mar 28, 2008 at 3:25 PM, David Beckwith <[EMAIL PROTECTED]> wrote: > > Hi, > > > > How can I mock the "go" method of class B so that it returns the > > string "fudge" in this si

Re: [rspec-users] How do you mock an object that you don't have access to?

2008-03-28 Thread Zach Dennis
http://atomicobjectrb.rubyforge.org/injection/ Zach On Fri, Mar 28, 2008 at 2:17 PM, aslak hellesoy <[EMAIL PROTECTED]> wrote: > > On Fri, Mar 28, 2008 at 8:12 PM, Pat Maddox <[EMAIL PROTECTED]> wrote: > > On Fri, Mar 28, 2008 at 11:32 AM, Luis Lavena <[EMAIL PROTECTED]> wrote: > > > On Fri, M

Re: [rspec-users] How do you mock an object that you don't have access to?

2008-03-28 Thread aslak hellesoy
On Fri, Mar 28, 2008 at 8:12 PM, Pat Maddox <[EMAIL PROTECTED]> wrote: > On Fri, Mar 28, 2008 at 11:32 AM, Luis Lavena <[EMAIL PROTECTED]> wrote: > > On Fri, Mar 28, 2008 at 3:25 PM, David Beckwith <[EMAIL PROTECTED]> wrote: > > > Hi, > > > > > > How can I mock the "go" method of class B so

Re: [rspec-users] How do you mock an object that you don't have access to?

2008-03-28 Thread Pat Maddox
On Fri, Mar 28, 2008 at 11:32 AM, Luis Lavena <[EMAIL PROTECTED]> wrote: > On Fri, Mar 28, 2008 at 3:25 PM, David Beckwith <[EMAIL PROTECTED]> wrote: > > Hi, > > > > How can I mock the "go" method of class B so that it returns the > > string "fudge" in this situation? > > > > class A > >

Re: [rspec-users] [Q] bug in mocks or user error?

2008-03-28 Thread Chuck Remes
On Mar 28, 2008, at 1:46 PM, David Chelimsky wrote: > On Fri, Mar 28, 2008 at 1:38 PM, Chuck Remes > <[EMAIL PROTECTED]> wrote: >> I'm trying to use a mock to return a hash so that #each_pair can >> process it. I can't get it to work. Whatever I return to #each_pair >> is >> ignored and the bl

Re: [rspec-users] [Q] bug in mocks or user error?

2008-03-28 Thread David Chelimsky
On Fri, Mar 28, 2008 at 1:38 PM, Chuck Remes <[EMAIL PROTECTED]> wrote: > I'm trying to use a mock to return a hash so that #each_pair can > process it. I can't get it to work. Whatever I return to #each_pair is > ignored and the block never gets executed. Here's an example > illustrating the pr

Re: [rspec-users] What is SpecServer?

2008-03-28 Thread David Beckwith
I guess I could just try it, but does spec_server work with autotest too? ie. ruby script/spec_server & autotest ? On Wed, Mar 12, 2008 at 9:36 PM, Scott Taylor <[EMAIL PROTECTED]> wrote: > > On Mar 13, 2008, at 12:17 AM, Mikel Lindsaar wrote: > > > I have looked through the docs, looked at

Re: [rspec-users] How do you mock an object that you don't have access to?

2008-03-28 Thread Luis Lavena
On Fri, Mar 28, 2008 at 3:25 PM, David Beckwith <[EMAIL PROTECTED]> wrote: > Hi, > > How can I mock the "go" method of class B so that it returns the > string "fudge" in this situation? > > class A > private > def start > @b = B.new > end > end > > class B > def go > puts "This

[rspec-users] How do you mock an object that you don't have access to?

2008-03-28 Thread David Beckwith
Hi, How can I mock the "go" method of class B so that it returns the string "fudge" in this situation? class A private def start @b = B.new end end class B def go puts "This is fun." end end Also, is it possible to do the mocha-like any_instance thing with RSpec? Thank you, Dav

Re: [rspec-users] [Q] bug in mocks or user error?

2008-03-28 Thread Chuck Remes
It ends up comparing nil to real_hash. This happens because the #result accessor never gets initialized due to the block never getting executed. cr On Mar 28, 2008, at 12:47 PM, George Anderson wrote: > What's the output (or error?) you're getting? > > /g > > On Fri, Mar 28, 2008 at 1:38 PM,

Re: [rspec-users] [Q] bug in mocks or user error?

2008-03-28 Thread George Anderson
What's the output (or error?) you're getting? /g On Fri, Mar 28, 2008 at 1:38 PM, Chuck Remes <[EMAIL PROTECTED]> wrote: > I'm trying to use a mock to return a hash so that #each_pair can > process it. I can't get it to work. Whatever I return to #each_pair is > ignored and the block never gets

[rspec-users] [Q] bug in mocks or user error?

2008-03-28 Thread Chuck Remes
I'm trying to use a mock to return a hash so that #each_pair can process it. I can't get it to work. Whatever I return to #each_pair is ignored and the block never gets executed. Here's an example illustrating the problem. require File.join(File.dirname(__FILE__), %w[spec_helper]) class MyE

Re: [rspec-users] Wrong story step running

2008-03-28 Thread Ashley Moran
Found this: if I change the other steps to And a user called "Mr Matching Username" with username " [EMAIL PROTECTED]" of typex END_USER and status APPROVED in organisation "My Infant School" And a user called "Mrs Matching SecondaryEmail" with secondary email " [EMAIL PROTECTED]" of typex EN

[rspec-users] Wrong story step running

2008-03-28 Thread Ashley Moran
Hi I have three steps like this: Given 'a user called "$name" of type $user_type and status $user_state in organisation "$organisation_name"' do |name, user_type, user_state, organisation_name| $runs ||= 1 puts "MOO #{$runs}" $runs += 1 # ... end Given 'a user called "$name

[rspec-users] help Steven Baker get to Scotland on Rails

2008-03-28 Thread David Chelimsky
Hi all, Warning - this is a request for money to help do something nice for someone. If this offends you in any way, please stop reading now and just delete this email. Steven Baker, the guy who actually wrote RSpec to begin with (just think of a world in which the only BDD frameworks were in C++