Re: [rspec-users] Edge, link_to and mocks

2007-07-06 Thread David Chelimsky
On 7/6/07, Marcus Crafter <[EMAIL PROTECTED]> wrote: > Hi All, > > Anyone noticed that using the newer link_to syntax in edge currently > fails with mocked objects in view specs or helpers. > > eg. if you have something like the following in your view (or > equivalent in a helper): > > <%=

Re: [rspec-users] Testing Rails Associations

2007-07-06 Thread David Chelimsky
On 7/3/07, Daniel N <[EMAIL PROTECTED]> wrote: > Hi, > > I'm very new to rspec, so if this is not the right forum please let me > know. > > I'm starting to spec my models first in an existing rails app, porting from > a mix of Test::Unit, and simply_bdd amongst others. > > I'm at the point where

Re: [rspec-users] mocking methods in the controller.

2007-07-06 Thread David Chelimsky
On 7/5/07, Daniel N <[EMAIL PROTECTED]> wrote: > Hi, > > I'm very new to rspec so please be patient with me. > > I've tried to take some of my tests out of the controller specs to check for > things that are rendered. > > This has not worked so well, since my views have the controller method > > cu

Re: [rspec-users] mocking methods in the controller.

2007-07-06 Thread Daniel N
On 7/6/07, David Chelimsky <[EMAIL PROTECTED]> wrote: On 7/5/07, Daniel N <[EMAIL PROTECTED]> wrote: > Hi, > > I'm very new to rspec so please be patient with me. > > I've tried to take some of my tests out of the controller specs to check for > things that are rendered. > > This has not worked

Re: [rspec-users] Testing Rails Associations

2007-07-06 Thread Daniel N
On 7/6/07, David Chelimsky <[EMAIL PROTECTED]> wrote: On 7/3/07, Daniel N <[EMAIL PROTECTED]> wrote: > Hi, > > I'm very new to rspec, so if this is not the right forum please let me > know. > > I'm starting to spec my models first in an existing rails app, porting from > a mix of Test::Unit, a

Re: [rspec-users] Testing Rails Associations

2007-07-06 Thread Daniel N
On 7/6/07, Daniel N <[EMAIL PROTECTED]> wrote: > > > > On 7/6/07, David Chelimsky <[EMAIL PROTECTED]> wrote: > > On 7/3/07, Daniel N <[EMAIL PROTECTED]> wrote: > > > Hi, > > > > > > I'm very new to rspec, so if this is not the right forum please let me > > > know. > > > > > > I'm starting to spec

Re: [rspec-users] mocking methods in the controller.

2007-07-06 Thread Daniel N
On 7/6/07, Daniel N <[EMAIL PROTECTED]> wrote: On 7/6/07, David Chelimsky <[EMAIL PROTECTED]> wrote: > > On 7/5/07, Daniel N <[EMAIL PROTECTED]> wrote: > > Hi, > > > > I'm very new to rspec so please be patient with me. > > > > I've tried to take some of my tests out of the controller specs to

Re: [rspec-users] mocking methods in the controller.

2007-07-06 Thread David Chelimsky
On 7/6/07, Daniel N <[EMAIL PROTECTED]> wrote: > On 7/6/07, Daniel N <[EMAIL PROTECTED]> wrote: > > On 7/6/07, David Chelimsky < [EMAIL PROTECTED]> wrote: > > > On 7/5/07, Daniel N <[EMAIL PROTECTED]> wrote: > > > > Hi, > > > > > > > > I'm very new to rspec so please be patient with me. > > > > > >

Re: [rspec-users] mocking methods in the controller.

2007-07-06 Thread Daniel N
On 7/6/07, David Chelimsky <[EMAIL PROTECTED]> wrote: On 7/6/07, Daniel N <[EMAIL PROTECTED]> wrote: > On 7/6/07, Daniel N <[EMAIL PROTECTED]> wrote: > > On 7/6/07, David Chelimsky < [EMAIL PROTECTED]> wrote: > > > On 7/5/07, Daniel N <[EMAIL PROTECTED]> wrote: > > > > Hi, > > > > > > > > I'm ve

[rspec-users] Outside-In with RSpec on Rails

2007-07-06 Thread Jed Hurt
I just read 'Mocks Aren't Stubs' and was intrigued by the notion of 'outside-in' TDD. As a Rails developer, I'm curious if others are employing this method when developing Rails applications using RSpec. Is it common practice (or even practical) to drive the development of a Rails app by starting

Re: [rspec-users] Outside-In with RSpec on Rails

2007-07-06 Thread David Chelimsky
On 7/6/07, Jed Hurt <[EMAIL PROTECTED]> wrote: > I just read 'Mocks Aren't Stubs' and was intrigued by the notion of > 'outside-in' TDD. > > As a Rails developer, I'm curious if others are employing this method > when developing Rails applications using RSpec. Is it common practice > (or even pract

[rspec-users] stubbing helper methods for View specs

2007-07-06 Thread Jens-Christian Fischer
Hi there I have several view specs, that include the following snippet in their "before" block to stub the methods by acts_as_authenticated before :each do @u = mock_model(User) @u.should_receive(:name).and_return("Hans Muster") template.should_receive(:logged_in?).and_return(

Re: [rspec-users] Outside-In with RSpec on Rails

2007-07-06 Thread Jed Hurt
Cool. I'll have to give it a try on my next project. On 7/6/07, David Chelimsky <[EMAIL PROTECTED]> wrote: > On 7/6/07, Jed Hurt <[EMAIL PROTECTED]> wrote: > > I just read 'Mocks Aren't Stubs' and was intrigued by the notion of > > 'outside-in' TDD. > > > > As a Rails developer, I'm curious if oth

Re: [rspec-users] mocking methods in the controller.

2007-07-06 Thread David Chelimsky
On 7/6/07, Daniel N <[EMAIL PROTECTED]> wrote: > > > > On 7/6/07, David Chelimsky <[EMAIL PROTECTED]> wrote: > > On 7/6/07, Daniel N <[EMAIL PROTECTED]> wrote: > > > On 7/6/07, Daniel N <[EMAIL PROTECTED]> wrote: > > > > On 7/6/07, David Chelimsky < [EMAIL PROTECTED]> wrote: > > > > > On 7/5/07, Da

Re: [rspec-users] stubbing helper methods for View specs

2007-07-06 Thread David Chelimsky
On 7/6/07, Jens-Christian Fischer <[EMAIL PROTECTED]> wrote: > Hi there > > I have several view specs, that include the following snippet in > their "before" block to stub the methods by acts_as_authenticated > >before :each do > @u = mock_model(User) > @u.should_receive(:name).and_re

Re: [rspec-users] stubbing helper methods for View specs

2007-07-06 Thread Jens-Christian Fischer
>> >> I don't have enough rspec_fu to deduce where the problem lies.. >> >> >> Any helpers? > > In a nutshell - Rails compiles templates the first time they are > encountered in a given runtime. Combine this with the fact that mock > expectations are cleared out after every example, but the mock >

Re: [rspec-users] stubbing helper methods for View specs

2007-07-06 Thread David Chelimsky
On 7/6/07, Jens-Christian Fischer <[EMAIL PROTECTED]> wrote: > >> > >> I don't have enough rspec_fu to deduce where the problem lies.. > >> > >> > >> Any helpers? > > > > In a nutshell - Rails compiles templates the first time they are > > encountered in a given runtime. Combine this with the fact