[rspec-users] Interesting shared behaviour side-effect

2007-10-21 Thread Wincent Colaiuta
Given the following ApplicationController specs: describe ApplicationController, "one facet", :shared => true do it 'foo' ... it 'bar' ... end describe ApplicationController, "some other facet", :shared => true do it 'abc' ... it 'xyz' ... end describe Applic

Re: [rspec-users] Interesting shared behaviour side-effect

2007-10-21 Thread Tom Stuart
On 21 Oct 2007, at 11:01, Wincent Colaiuta wrote: > Not actually a big deal; seeing as the specs don't have any side- > effects and running them twice is harmless, and in any case getting > rid of the nesting (putting all the specs in a single shared > behaviour block) gets rid of the duplicate. Bu

Re: [rspec-users] Interesting shared behaviour side-effect

2007-10-21 Thread David Chelimsky
On 10/21/07, Wincent Colaiuta <[EMAIL PROTECTED]> wrote: > Given the following ApplicationController specs: > >describe ApplicationController, "one facet", :shared => true do > it 'foo' ... > it 'bar' ... >end > >describe ApplicationController, "some other facet", :shared => >

Re: [rspec-users] Assumption tests

2007-10-21 Thread Ashley Moran
On Oct 21, 2007, at 1:12 am, Jay Levitt wrote: > I keep threatening (in my head) to build a "proper" mock of at least > part of AR, but it just keeps joining the large list of open source > tools I use that I'm gonna go "fix" someday... Mock ActiveRecord? Hell to that, I've had enough of DHH's

Re: [rspec-users] Interesting shared behaviour side-effect

2007-10-21 Thread Ashley Moran
On Oct 21, 2007, at 11:01 am, Wincent Colaiuta wrote: > And note that it's running the shared behaviours in this order: > >- 'one facet' >- 'some other facet' >- 'some other facet' >- 'one facet' On a similar note, AGES ago, I promised to submit a patch for something I ripped

Re: [rspec-users] Interesting shared behaviour side-effect

2007-10-21 Thread David Chelimsky
On 10/21/07, Ashley Moran <[EMAIL PROTECTED]> wrote: > > On Oct 21, 2007, at 11:01 am, Wincent Colaiuta wrote: > > > And note that it's running the shared behaviours in this order: > > > >- 'one facet' > >- 'some other facet' > >- 'some other facet' > >- 'one facet' > > > On a simil

Re: [rspec-users] Problems with form_for and partials

2007-10-21 Thread rupert
> i'm having problem with a form_for situation where i'm trying to DRY > out the repeated parts of my forms and put them in common/form and > render the form elements via another partial in controller_name/_form. > Here's the first form > > # app/views/common/form > <% form_for ... do |f| -%> > <

Re: [rspec-users] Interesting shared behaviour side-effect

2007-10-21 Thread Ashley Moran
On Oct 21, 2007, at 1:42 pm, David Chelimsky wrote: > That's how we do it because we don't have the facet facility. For now, > however, there are too many other moving parts to consider the > additional layer. I would definitely consider it down the road. That's ok, I was asking because I was ha

Re: [rspec-users] Interesting shared behaviour side-effect

2007-10-21 Thread David Chelimsky
On 10/21/07, Ashley Moran <[EMAIL PROTECTED]> wrote: > > On Oct 21, 2007, at 1:42 pm, David Chelimsky wrote: > > > That's how we do it because we don't have the facet facility. For now, > > however, there are too many other moving parts to consider the > > additional layer. I would definitely consi

[rspec-users] Preferred mock framework

2007-10-21 Thread Ashley Moran
Hi In light of the fact that RSpec mocks are going into maintenance mode in the near future, I was wondering what everyone was switching to. I liked the look of FlexMock most, so gave that a shot. However, there's a few things that don't work well with RSpec due to the traditional differen

Re: [rspec-users] Interesting shared behaviour side-effect

2007-10-21 Thread Ashley Moran
On Oct 21, 2007, at 2:34 pm, David Chelimsky wrote: > Please wait on this. As I said earlier this thread, there are too many > moving parts right now. Story Runner is still very new (not yet > released) and our plan is to use the Spec Runner formats for Story > Runner so the output looks uniform

Re: [rspec-users] Preferred mock framework

2007-10-21 Thread David Chelimsky
On 10/21/07, Ashley Moran <[EMAIL PROTECTED]> wrote: > Hi > > In light of the fact that RSpec mocks are going into maintenance mode > in the near future, I was wondering what everyone was switching to. > I'm sure I read here that RSpec mocks will be maintained for RSpec's > own specs. (Correcti

Re: [rspec-users] Preferred mock framework

2007-10-21 Thread Ashley Moran
On Oct 21, 2007, at 2:44 pm, David Chelimsky wrote: > The decision was to keep on maintaining the mock framework as part of > RSpec for the foreseeable future. If/when we decide to deprecate it, > we will provide an easy transition path. Ok cool. I was working on a false assumption then. I'll

Re: [rspec-users] Preferred mock framework

2007-10-21 Thread David Chelimsky
On 10/21/07, Ashley Moran <[EMAIL PROTECTED]> wrote: > > On Oct 21, 2007, at 2:44 pm, David Chelimsky wrote: > > > The decision was to keep on maintaining the mock framework as part of > > RSpec for the foreseeable future. If/when we decide to deprecate it, > > we will provide an easy transition pa

Re: [rspec-users] Preferred mock framework

2007-10-21 Thread Ashley Moran
On Oct 21, 2007, at 3:08 pm, David Chelimsky wrote: > This has nothing to do with trunk! It was a discussion on the list. > That's all. No I know, I just meant the rate the project is moving at can be overwhelming sometimes. I only have to spend a short time away from it and I've got a st

Re: [rspec-users] Preferred mock framework

2007-10-21 Thread David Chelimsky
On 10/21/07, Ashley Moran <[EMAIL PROTECTED]> wrote: > > On Oct 21, 2007, at 3:08 pm, David Chelimsky wrote: > > > This has nothing to do with trunk! It was a discussion on the list. > > That's all. > > No I know, I just meant the rate the project is moving at can be > overwhelming sometimes. Got

Re: [rspec-users] Preferred mock framework

2007-10-21 Thread Ashley Moran
On Oct 21, 2007, at 3:16 pm, Ashley Moran wrote: > No I know, I just meant the rate the project is moving at can be > overwhelming sometimes. Which is a good thing, in case it sounded like a criticism! I'd rather be overwhelmed than bored. -- blog @ http://aviewfromafar.net/ linked-in @ h

Re: [rspec-users] Preferred mock framework

2007-10-21 Thread Ashley Moran
On Oct 21, 2007, at 3:22 pm, David Chelimsky wrote: > Don't worry about mailing the list. That's what it's for! I sometimes wonder how you get time to work on the code with all the time you spend offering support here! Don't change though :D I know everyone else is equally grateful. Ashl

Re: [rspec-users] Preferred mock framework

2007-10-21 Thread David Chelimsky
On 10/21/07, Ashley Moran <[EMAIL PROTECTED]> wrote: > > On Oct 21, 2007, at 3:22 pm, David Chelimsky wrote: > > > Don't worry about mailing the list. That's what it's for! > > I sometimes wonder how you get time to work on the code with all the > time you spend offering support here! Don't chang

Re: [rspec-users] Preferred mock framework

2007-10-21 Thread Ashley Moran
On Oct 21, 2007, at 3:34 pm, David Chelimsky wrote: > Thanks. Unfortunately, as the list of users grows, I do have to change > a bit if I want to get my other work done, write a book, and still > have a life. Luckily, there are some thoughtful people, including > yourself, emerging as mentors on

[rspec-users] Quick facets hack

2007-10-21 Thread Ashley Moran
Following the discussion earlier, I knocked together a trunk- compatible "facets" monkey-patch, if anyone wants to play with it: It's simplistic, but it will do for me for the time being. Ashley -- blog @ http://a

Re: [rspec-users] Interesting shared behaviour side-effect

2007-10-21 Thread Wincent Colaiuta
El 21/10/2007, a las 14:42, "David Chelimsky" <[EMAIL PROTECTED]> escribió: > > On 10/21/07, Wincent Colaiuta <[EMAIL PROTECTED]> wrote: >> >> Not actually a big deal; seeing as the specs don't have any side- >> effects and running them twice is harmless, and in any case getting >> rid of the ne

Re: [rspec-users] spec:models depends on development db:migration

2007-10-21 Thread Bryan Helmkamp
On 10/18/07, Keith McDonnell <[EMAIL PROTECTED]> wrote: > rake spec:models seems to clone the test database from development. If > your dev db is empty, the models task fails mysteriously. > > Anyway, to make sure your dev db is at the current migration version, I > added this dependency in lib/tas

Re: [rspec-users] spec:models depends on development db:migration

2007-10-21 Thread Scott Taylor
On Oct 21, 2007, at 3:35 PM, Bryan Helmkamp wrote: > On 10/18/07, Keith McDonnell <[EMAIL PROTECTED]> wrote: >> rake spec:models seems to clone the test database from >> development. If >> your dev db is empty, the models task fails mysteriously. >> >> Anyway, to make sure your dev db is at the

[rspec-users] plain text stories

2007-10-21 Thread David Chelimsky
Thanks to discussions on this list, suggestions from many of you and a patch from Pat Maddox, we now have Plain Text User Stories in Story Runner. Read more: http://blog.davidchelimsky.net/articles/2007/10/21/story-runner-in-plain-english Cheers, David ___

Re: [rspec-users] plain text stories

2007-10-21 Thread Mike Vincent
AWESOME. :) On 10/21/07, David Chelimsky <[EMAIL PROTECTED]> wrote: > Thanks to discussions on this list, suggestions from many of you and a > patch from Pat Maddox, we now have Plain Text User Stories in Story > Runner. > > Read more: > > http://blog.davidchelimsky.net/articles/2007/10/21/story-r

Re: [rspec-users] plain text stories

2007-10-21 Thread Pat Maddox
On 10/21/07, David Chelimsky <[EMAIL PROTECTED]> wrote: > Thanks to discussions on this list, suggestions from many of you and a > patch from Pat Maddox, we now have Plain Text User Stories in Story > Runner. > > Read more: > > http://blog.davidchelimsky.net/articles/2007/10/21/story-runner-in-plai

Re: [rspec-users] plain text stories

2007-10-21 Thread Daniel N
On 10/22/07, David Chelimsky <[EMAIL PROTECTED]> wrote: > > Thanks to discussions on this list, suggestions from many of you and a > patch from Pat Maddox, we now have Plain Text User Stories in Story > Runner. > > Read more: > > > http://blog.davidchelimsky.net/articles/2007/10/21/story-runner-in-

Re: [rspec-users] plain text stories

2007-10-21 Thread Pat Maddox
"Keep in mind that this is brand new and very experimental. I do not recommend that you start converting all your projects to using this." hehehe.yeah, okay :) ___ rspec-users mailing list rspec-users@rubyforge.org http://rubyforge.org/mailman/listin

[rspec-users] View spec response has no content?

2007-10-21 Thread Steve
I have been messing with this all night, and can't figure out what's going wrong here. I have a test that renders the view, and then a shared behavior checks "response" for the various tags from a rails layout. The problem is matching. If I run in the browser the page renders fine. Is there a way t

Re: [rspec-users] plain text stories

2007-10-21 Thread Ben Mabey
David Chelimsky wrote: > Thanks to discussions on this list, suggestions from many of you and a > patch from Pat Maddox, we now have Plain Text User Stories in Story > Runner. > > Read more: > > http://blog.davidchelimsky.net/articles/2007/10/21/story-runner-in-plain-english > > Cheers, > David > _

Re: [rspec-users] View spec response has no content?

2007-10-21 Thread Steve
On Mon, 22 Oct 2007 02:49:59 +, Steve wrote: > I have been messing with this all night, and can't figure out what's going > wrong here. I have a test that renders the view, and then a shared > behavior checks "response" for the various tags from a rails layout. The > problem is matching. If I

Re: [rspec-users] Testing layouts with RSpec on Rails

2007-10-21 Thread Steve
On Tue, 09 Oct 2007 21:12:09 +0100, Matt Patterson wrote: > It occured to me that it would be nice to have a spec that would barf > if I ever nuked the layout's yield (or, indeed, one of its > content_for yields), mainly because they're the integration point > between layouts and views, and

[rspec-users] Pending should_receive shows as FIXED

2007-10-21 Thread Steve
I have a mock should_receive expectation wrapped in a "pending" block, and it appears as being fixed when the specs are run, when in reality it is not. Anyone else experience this behavior? I'm assuming this is because the mock waits until the "it" block completion to determine expectations rather

Re: [rspec-users] plain text stories

2007-10-21 Thread Ashley Moran
On Oct 22, 2007, at 12:33 am, David Chelimsky wrote: > Thanks to discussions on this list, suggestions from many of you and a > patch from Pat Maddox, we now have Plain Text User Stories in Story > Runner. > > Read more: > > http://blog.davidchelimsky.net/articles/2007/10/21/story-runner-in- > p