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
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 =
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
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
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
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
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
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
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 ??
=
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
>
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
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
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
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
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
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
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
>
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
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
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'
20 matches
Mail list logo