Re: [rspec-users] expect_render, why does there need to be a warning

2007-08-14 Thread David Chelimsky
On 8/14/07, Zach Dennis <[EMAIL PROTECTED]> wrote: > On 8/14/07, David Chelimsky <[EMAIL PROTECTED]> wrote: > > On 8/14/07, Zach Dennis <[EMAIL PROTECTED]> wrote: > > > There is a warning on the web site about expect_render and stub_render: > > > > > > "WARNING: expect_render and stub_render, while

Re: [rspec-users] To mock or not mock base classes

2007-08-14 Thread Pat Maddox
On 8/14/07, Scott Taylor <[EMAIL PROTECTED]> wrote: > > Just a general opinion question on idioms/common usage. Is it better > to mock Ruby's base classes, or to use real instances of those base > classes? > > @string = mock String > @string.stub!(:to_s).and_return "hello" > > # or: > > @string =

Re: [rspec-users] Stubbing all methods

2007-08-14 Thread aslak hellesoy
On 8/15/07, aslak hellesoy <[EMAIL PROTECTED]> wrote: > On 8/15/07, Scott Taylor <[EMAIL PROTECTED]> wrote: > > > > Mocha's mock/stub framework has the ability to stub all methods on a > > mock given. Does RSpec's mocking framework have this ability? > > No Err, actually it is possible. (I first

[rspec-users] Using rspec in a non-rails project w/ autotest

2007-08-14 Thread Scott Taylor
Not sure if anyone needs this, but I have successfully been running rspec/trunk with autotest for a few days now on a non-rails project. The process is pretty simple: 1. Put rspec into vendor/plugins/rspec (on externals, or simply frozen) 2. Add autotest/discover.rb: Autotest.add_discovery

[rspec-users] To mock or not mock base classes

2007-08-14 Thread Scott Taylor
Just a general opinion question on idioms/common usage. Is it better to mock Ruby's base classes, or to use real instances of those base classes? @string = mock String @string.stub!(:to_s).and_return "hello" # or: @string = "hello" I was wondering which is generally favored, and if so, fo

Re: [rspec-users] AssociationTypeMismatch with RSpec 1.0.8, autotest running with drb

2007-08-14 Thread Edward Ocampo-Gooding
aslak hellesoy wrote: > On 8/14/07, Edward Ocampo-Gooding <[EMAIL PROTECTED]> wrote: >> Before I chalk this up as a bug and report it, I just want to make sure I'm >> not >> doing something silly. >> >> Running ZenTest's autotest on OS 10.4.10 with RSpec 1.0.8, drb, produces the >> following faile

Re: [rspec-users] expect_render, why does there need to be a warning

2007-08-14 Thread Zach Dennis
On 8/14/07, David Chelimsky <[EMAIL PROTECTED]> wrote: > On 8/14/07, Zach Dennis <[EMAIL PROTECTED]> wrote: > > There is a warning on the web site about expect_render and stub_render: > > > > "WARNING: expect_render and stub_render, while very useful, act > > differently from standard Message Expec

Re: [rspec-users] Stubbing all methods

2007-08-14 Thread Scott Taylor
On Aug 14, 2007, at 7:09 PM, Courtenay wrote: > On 8/14/07, aslak hellesoy <[EMAIL PROTECTED]> wrote: >> On 8/15/07, Scott Taylor <[EMAIL PROTECTED]> wrote: >>> >>> Mocha's mock/stub framework has the ability to stub all methods on a >>> mock given. Does RSpec's mocking framework have this abili

Re: [rspec-users] Stubbing all methods

2007-08-14 Thread Courtenay
On 8/14/07, aslak hellesoy <[EMAIL PROTECTED]> wrote: > On 8/15/07, Scott Taylor <[EMAIL PROTECTED]> wrote: > > > > Mocha's mock/stub framework has the ability to stub all methods on a > > mock given. Does RSpec's mocking framework have this ability? > You mean like :null_object => true ?? =

Re: [rspec-users] Stubbing all methods

2007-08-14 Thread aslak hellesoy
On 8/15/07, Scott Taylor <[EMAIL PROTECTED]> wrote: > > Mocha's mock/stub framework has the ability to stub all methods on a > mock given. Does RSpec's mocking framework have this ability? No > And > if not, is there some reason it shouldn't be implemeneted? > Not that I can think of. Aslak >

[rspec-users] Stubbing all methods

2007-08-14 Thread Scott Taylor
Mocha's mock/stub framework has the ability to stub all methods on a mock given. Does RSpec's mocking framework have this ability? And if not, is there some reason it shouldn't be implemeneted? Regards, Scott ___ rspec-users mailing list rspec-u

Re: [rspec-users] (no subject)

2007-08-14 Thread Scott Taylor
On Aug 14, 2007, at 5:53 PM, Scott Taylor wrote: > > On Aug 14, 2007, at 5:17 PM, aslak hellesoy wrote: > >> On 8/14/07, Scott Taylor <[EMAIL PROTECTED]> wrote: >>> >>> How would you spec out something like the following: >>> >> >> You're starting with the code, trying to tape on the spec afterwa

Re: [rspec-users] Upgrade to 1.0.8 broke Rake

2007-08-14 Thread Luis Lavena
A follow up... On 8/14/07, Luis Lavena <[EMAIL PROTECTED]> wrote: > Hello Guys. > > I'm upgrading a project from 0.9.8 to 1.0.8, following this procedure: > First, is 0.9.4 :-) > > Now, when running rake, get the following error: superclass mismatch > for class Annotation > > The following past

Re: [rspec-users] (no subject)

2007-08-14 Thread Scott Taylor
On Aug 14, 2007, at 5:17 PM, aslak hellesoy wrote: > On 8/14/07, Scott Taylor <[EMAIL PROTECTED]> wrote: >> >> How would you spec out something like the following: >> > > You're starting with the code, trying to tape on the spec afterwards. > This is always a difficult task and is exactly what BD

[rspec-users] Upgrade to 1.0.8 broke Rake

2007-08-14 Thread Luis Lavena
Hello Guys. I'm upgrading a project from 0.9.8 to 1.0.8, following this procedure: * Removed vendor/plugins/rspec* completely. * installed rspec and rspec_on_rails from svn://rubyforge.org/var/svn/rspec/tags/REL_1_0_8 * Run script/generate rspec to update spec_helper and spec.opts Now, when runn

Re: [rspec-users] (no subject)

2007-08-14 Thread aslak hellesoy
On 8/14/07, Scott Taylor <[EMAIL PROTECTED]> wrote: > > How would you spec out something like the following: > You're starting with the code, trying to tape on the spec afterwards. This is always a difficult task and is exactly what BDD and RSpec is trying to get you away from. Have you tried wri

Re: [rspec-users] (no subject)

2007-08-14 Thread rupert
On 14/8/07 21:30, "Scott Taylor" <[EMAIL PROTECTED]> wrote: > How would you spec out something like the following: > > def a_method >x = Class.new do > include Enumerable >end > ># do something here with x > end > > > describe "The Anonymous Class" do > >before :each do >

[rspec-users] (no subject)

2007-08-14 Thread Scott Taylor
How would you spec out something like the following: def a_method x = Class.new do include Enumerable end # do something here with x end describe "The Anonymous Class" do before :each do @anonymous_class = mock Class Class.stub!(:new).and_return @anonymous_class

Re: [rspec-users] AssociationTypeMismatch with RSpec 1.0.8, autotest running with drb

2007-08-14 Thread aslak hellesoy
On 8/14/07, Edward Ocampo-Gooding <[EMAIL PROTECTED]> wrote: > Before I chalk this up as a bug and report it, I just want to make sure I'm > not > doing something silly. > > Running ZenTest's autotest on OS 10.4.10 with RSpec 1.0.8, drb, produces the > following failed test: > > ActiveRecord::Asso

[rspec-users] AssociationTypeMismatch with RSpec 1.0.8, autotest running with drb

2007-08-14 Thread Edward Ocampo-Gooding
Before I chalk this up as a bug and report it, I just want to make sure I'm not doing something silly. Running ZenTest's autotest on OS 10.4.10 with RSpec 1.0.8, drb, produces the following failed test: ActiveRecord::AssociationTypeMismatch in 'User should create an avatar with uploaded_data'