Re: [rspec-users] Shoulda and explicit subject

2010-07-01 Thread David Chelimsky
On Jul 1, 2010, at 10:32 PM, ericindc wrote: > On Jul 1, 11:10 pm, David Chelimsky wrote: >> On Jul 1, 2010, at 9:35 PM, ericindc wrote: >>> On Jul 1, 10:32 pm, David Chelimsky wrote: On Jul 1, 2010, at 9:01 PM, ericindc wrote: > On Jul 1, 9:47 pm, David Chelimsky wrote: >> On Jul

Re: [rspec-users] Shoulda and explicit subject

2010-07-01 Thread ericindc
Will do, thanks! On Jul 1, 11:10 pm, David Chelimsky wrote: > On Jul 1, 2010, at 9:35 PM, ericindc wrote: > > > > > > > > > On Jul 1, 10:32 pm, David Chelimsky wrote: > >> On Jul 1, 2010, at 9:01 PM, ericindc wrote: > > >>> On Jul 1, 9:47 pm, David Chelimsky wrote: > On Jul 1, 2010, at 8:4

Re: [rspec-users] Shoulda and explicit subject

2010-07-01 Thread David Chelimsky
On Jul 1, 2010, at 9:35 PM, ericindc wrote: > > > On Jul 1, 10:32 pm, David Chelimsky wrote: >> On Jul 1, 2010, at 9:01 PM, ericindc wrote: >> >> >> >> >> >>> On Jul 1, 9:47 pm, David Chelimsky wrote: On Jul 1, 2010, at 8:40 PM, ericindc wrote: > On Jul 1, 3:23 pm, David Chelimsky

Re: [rspec-users] Shoulda and explicit subject

2010-07-01 Thread ericindc
Here is the full controller spec that is passing...removing the subject line fails all bu the render_template. require 'spec_helper' describe HomepageController do describe "routes" do it { should route(:get, "/").to(:action => :index) } end describe "on GET to :index" do before(

Re: [rspec-users] Shoulda and explicit subject

2010-07-01 Thread David Chelimsky
On Jul 1, 2010, at 9:01 PM, ericindc wrote: > On Jul 1, 9:47 pm, David Chelimsky wrote: >> On Jul 1, 2010, at 8:40 PM, ericindc wrote: >>> On Jul 1, 3:23 pm, David Chelimsky wrote: On Jun 30, 2010, at 12:00 PM, ericindc wrote: >> > I am trying to use Shoulda matchers with the latest be

Re: [rspec-users] Shoulda and explicit subject

2010-07-01 Thread ericindc
http://groups.google.com/group/shoulda/browse_thread/thread/9a19ca5f60285e2d On Jul 1, 9:47 pm, David Chelimsky wrote: > On Jul 1, 2010, at 8:40 PM, ericindc wrote: > > > > > > > On Jul 1, 3:23 pm, David Chelimsky wrote: > >> On Jun 30, 2010, at 12:00 PM, ericindc wrote: > > >>> I am trying to

Re: [rspec-users] Shoulda and explicit subject

2010-07-01 Thread David Chelimsky
On Jul 1, 2010, at 8:40 PM, ericindc wrote: > On Jul 1, 3:23 pm, David Chelimsky wrote: >> On Jun 30, 2010, at 12:00 PM, ericindc wrote: >> >>> I am trying to use Shoulda matchers with the latest beta version of >>> RSpec for Rails 3. I've managed to track down the cause of my errors >>> to need

Re: [rspec-users] Shoulda and explicit subject

2010-07-01 Thread ericindc
I have a thread open on their group page as well, but the only response received thus far seems to think it's an RSpec issue. I am having the same issue in my model tests as well. On Jul 1, 3:23 pm, David Chelimsky wrote: > On Jun 30, 2010, at 12:00 PM, ericindc wrote: > > > I am trying to use S

Re: [rspec-users] Shoulda and explicit subject

2010-07-01 Thread David Chelimsky
On Jun 30, 2010, at 12:00 PM, ericindc wrote: > I am trying to use Shoulda matchers with the latest beta version of > RSpec for Rails 3. I've managed to track down the cause of my errors > to needing to explicitly set the subject, but the Shoulda examples > make no mention of requiring this step.

[rspec-users] Shoulda and explicit subject

2010-07-01 Thread ericindc
I am trying to use Shoulda matchers with the latest beta version of RSpec for Rails 3. I've managed to track down the cause of my errors to needing to explicitly set the subject, but the Shoulda examples make no mention of requiring this step. I've pastied the errors I'm receiving and adding subj

Re: [rspec-users] Shoulda

2008-10-01 Thread Andy Freeman
I updated the gist posting. All of the macros should be functional now and have cleaned up describe blocks. http://gist.github.com/14050 Andy Freeman wrote: > It is a bit ugly but here is an initial port of the Shoulda ActiveRecord > macros: > > http://gist.github.com/14050 > > I did not try

Re: [rspec-users] Shoulda

2008-10-01 Thread Andy Freeman
It is a bit ugly but here is an initial port of the Shoulda ActiveRecord macros: http://gist.github.com/14050 I did not try running ALL of the macros, but most of them. Before going too far with it, I would appreciate some recommendations as to how to improve the flow. The Shoulda version ha

Re: [rspec-users] Shoulda

2008-09-30 Thread Andy Freeman
I was actually teasing... :) As far as writing one... already on it! David Chelimsky wrote: > On Tue, Sep 30, 2008 at 10:18 PM, Andy Freeman <[EMAIL PROTECTED]> > wrote: >>> >>> Here's a variation on that with a helper for defining macros that I'm >>> thinking of adding to rspec. Lemme know what

Re: [rspec-users] Shoulda

2008-09-30 Thread David Chelimsky
On Tue, Sep 30, 2008 at 9:38 AM, Ben Mabey <[EMAIL PROTECTED]> wrote: > David Chelimsky wrote: >> >> On Tue, Sep 30, 2008 at 7:59 AM, Zach Dennis <[EMAIL PROTECTED]> >> wrote: >> >>> >>> Also, a nice thing about RSpec is that when you do describe an actual >>> object, ie: "describe Foo", you can de

Re: [rspec-users] Shoulda

2008-09-30 Thread David Chelimsky
On Tue, Sep 30, 2008 at 10:18 PM, Andy Freeman <[EMAIL PROTECTED]> wrote: > David Chelimsky wrote: >> On Tue, Sep 30, 2008 at 7:59 AM, Zach Dennis <[EMAIL PROTECTED]> >> wrote: On Tue, Sep 30, 2008 at 8:41 AM, Andy Freeman <[EMAIL PROTECTED]> wrote: > Are you willing to provide a simple ex

Re: [rspec-users] Shoulda

2008-09-30 Thread Andy Freeman
What's not to like?! Despite the fact that a new RSpec version was just released, it would be nice to see a new version released right away with this concept built in so that a RSpec version of Shoulda could start rolling. :) David Chelimsky wrote: > On Tue, Sep 30, 2008 at 7:59 AM, Zach Den

Re: [rspec-users] Shoulda

2008-09-30 Thread Zach Dennis
On Tue, Sep 30, 2008 at 10:38 AM, Ben Mabey <[EMAIL PROTECTED]> wrote: > David Chelimsky wrote: >> >> On Tue, Sep 30, 2008 at 7:59 AM, Zach Dennis <[EMAIL PROTECTED]> >> wrote: >> >>> >>> Also, a nice thing about RSpec is that when you do describe an actual >>> object, ie: "describe Foo", you can d

Re: [rspec-users] Shoulda

2008-09-30 Thread Ben Mabey
David Chelimsky wrote: On Tue, Sep 30, 2008 at 7:59 AM, Zach Dennis <[EMAIL PROTECTED]> wrote: Also, a nice thing about RSpec is that when you do describe an actual object, ie: "describe Foo", you can determine this by asking the example group what it's described type is. This makes things a

Re: [rspec-users] Shoulda

2008-09-30 Thread David Chelimsky
On Tue, Sep 30, 2008 at 7:59 AM, Zach Dennis <[EMAIL PROTECTED]> wrote: > Also, a nice thing about RSpec is that when you do describe an actual > object, ie: "describe Foo", you can determine this by asking the > example group what it's described type is. > > This makes things a lot simpler and cle

Re: [rspec-users] Shoulda

2008-09-30 Thread Zach Dennis
Also, a nice thing about RSpec is that when you do describe an actual object, ie: "describe Foo", you can determine this by asking the example group what it's described type is. This makes things a lot simpler and cleaner than having to hack away strings, or guess based on the name of your test.

Re: [rspec-users] Shoulda

2008-09-30 Thread Zach Dennis
On Tue, Sep 30, 2008 at 8:41 AM, Andy Freeman <[EMAIL PROTECTED]> wrote: > Are you willing to provide a simple example? I'm using the same example as the articled you linked to originally as the base. This way you should be able to clearly see the differences. http://gist.github.com/13804 Zach

Re: [rspec-users] Shoulda

2008-09-30 Thread Andy Freeman
Are you willing to provide a simple example? Andy Matt Wynne wrote: > We do something similar to this, though we use a convention to set > @klass to the class being spec'd in the top-level example group, > rather than deriving it as they do in that sample. > > In view specs we also use a convent

Re: [rspec-users] Shoulda

2008-09-30 Thread Matt Wynne
We do something similar to this, though we use a convention to set @klass to the class being spec'd in the top-level example group, rather than deriving it as they do in that sample. In view specs we also use a convention to always have a do_render method available, so that we can bring in

[rspec-users] Shoulda

2008-09-30 Thread Andy Freeman
I just stumbled upon this link this morning where Shoulda makes it easy to automatically load custom macros. Is there a similar feature in RSpec? http://technicalpickles.com/posts/shoulda-can-automatically-load-custom-macros Andy -- Posted via http://www.ruby-forum.com/. ___

Re: [rspec-users] Shoulda

2008-01-10 Thread Nathan Sutton
That too :) Nathan Sutton [EMAIL PROTECTED] rspec 1.1 rspec_on_rails 1.1 rails 2.0.2 On Jan 10, 2008, at 6:59 PM, David Chelimsky wrote: > On Jan 10, 2008 6:48 PM, Nathan Sutton <[EMAIL PROTECTED]> > wrote: >> You should browse over how shoulda does it here: >> http://thoughtbot.com/projects/s

Re: [rspec-users] Shoulda

2008-01-10 Thread David Chelimsky
On Jan 10, 2008 6:48 PM, Nathan Sutton <[EMAIL PROTECTED]> wrote: > You should browse over how shoulda does it here: > http://thoughtbot.com/projects/shoulda/tutorial/controllers Or how others are supplying plugins for rspec: http://weblog.techno-weenie.net/2007/12/26/controller-specs-are-a-drag

Re: [rspec-users] Shoulda

2008-01-10 Thread Nathan Sutton
You should browse over how shoulda does it here: http://thoughtbot.com/projects/shoulda/tutorial/controllers and here: http://dev.thoughtbot.com/shoulda/classes/ThoughtBot/Shoulda/Controller/ClassMethods.html Nathan Sutton [EMAIL PROTECTED] rspec 1.1 rspec_on_rails 1.1 rails 2.0.2 On Jan 10, 200

Re: [rspec-users] Shoulda

2008-01-10 Thread Pat Maddox
On Jan 10, 2008 4:17 PM, Jonathan Leighton <[EMAIL PROTECTED]> wrote: > In principle, yes. But what if your association isn't that interesting. > What if it is literally has_many :posts and that's it. You still want to > make sure it will work (for instance that the posts.blogger_id column > actual

Re: [rspec-users] Shoulda

2008-01-10 Thread Jonathan Leighton
On Thu, 2008-01-10 at 18:47 -0500, Josh Knowles wrote: > On 1/10/08, Nathan Sutton <[EMAIL PROTECTED]> wrote: > > Hmm, that includes a good number of them, but there's still the > > restful resource to think about, which is in my opinion the most > > valuable one. Would you consider the addition o

Re: [rspec-users] Shoulda

2008-01-10 Thread Jonathan Leighton
On Thu, 2008-01-10 at 18:09 -0600, David Chelimsky wrote: > It has more to do with what I'm looking at in my specs than what lies > under the hood. Why do I care if a visitor has_many(:posts)? Maybe > there is something different about a blogger with no posts vs one with > 50. So I'd have an exampl

Re: [rspec-users] Shoulda

2008-01-10 Thread James Deville
On Jan 10, 2008, at 4:11 PM, Nathan Sutton wrote: > Well then, hop to! ;) > Nathan Sutton > [EMAIL PROTECTED] > rspec 1.1 > rspec_on_rails 1.1 > rails 2.0.2 > > On Jan 10, 2008, at 6:10 PM, David Chelimsky wrote: > >> On Jan 10, 2008 6:07 PM, Nathan Sutton <[EMAIL PROTECTED]> >> wrote: >>> Hey no

Re: [rspec-users] Shoulda

2008-01-10 Thread Nathan Sutton
Well then, hop to! ;) Nathan Sutton [EMAIL PROTECTED] rspec 1.1 rspec_on_rails 1.1 rails 2.0.2 On Jan 10, 2008, at 6:10 PM, David Chelimsky wrote: > On Jan 10, 2008 6:07 PM, Nathan Sutton <[EMAIL PROTECTED]> > wrote: >> Hey now! Really though, have you ever been digging through old >> mailing

Re: [rspec-users] Shoulda

2008-01-10 Thread David Chelimsky
On Jan 10, 2008 6:07 PM, Nathan Sutton <[EMAIL PROTECTED]> wrote: > Hey now! Really though, have you ever been digging through old > mailing lists and wondered which version they were using when they had > that issue? Or when someone posts and issue, you need to ask them > what versions of everyt

Re: [rspec-users] Shoulda

2008-01-10 Thread David Chelimsky
On Jan 10, 2008 6:04 PM, Jonathan Leighton <[EMAIL PROTECTED]> wrote: > On Thu, 2008-01-10 at 17:59 -0600, David Chelimsky wrote: > > Another issue is BDD philosophy. BDD is about behaviour. should > > have_many(:posts) is not behaviour. It is structure. I understand that > > there are people who v

Re: [rspec-users] Shoulda

2008-01-10 Thread Nathan Sutton
Hey now! Really though, have you ever been digging through old mailing lists and wondered which version they were using when they had that issue? Or when someone posts and issue, you need to ask them what versions of everything they're using? It can be a pain and it usually wastes time/e

Re: [rspec-users] Shoulda

2008-01-10 Thread James Deville
Speaking for myself, since I support the same philosophy, I wouldn't test the association. I don't care that it has_many posts. I might care that I can add multiple posts, or that I can find posts by criteria, so I would test that. JD On Jan 10, 2008, at 4:04 PM, Jonathan Leighton wrote: >

Re: [rspec-users] Shoulda

2008-01-10 Thread Jonathan Leighton
On Thu, 2008-01-10 at 17:59 -0600, David Chelimsky wrote: > Another issue is BDD philosophy. BDD is about behaviour. should > have_many(:posts) is not behaviour. It is structure. I understand that > there are people who view this differently, and I would not want to > get in the way of anyone using

Re: [rspec-users] Shoulda

2008-01-10 Thread David Chelimsky
On Jan 10, 2008 6:02 PM, Nathan Sutton <[EMAIL PROTECTED]> wrote: > Nathan Sutton > [EMAIL PROTECTED] > rspec 1.1 > rspec_on_rails 1.1 > rails 2.0.2 I love that your sig has your rspec and rails versions. That cracks me up. ___ rspec-users mailing list r

Re: [rspec-users] Shoulda

2008-01-10 Thread Nathan Sutton
There David goes, making sense again. Nathan Sutton [EMAIL PROTECTED] rspec 1.1 rspec_on_rails 1.1 rails 2.0.2 On Jan 10, 2008, at 5:59 PM, David Chelimsky wrote: > On Jan 10, 2008 5:50 PM, Nathan Sutton <[EMAIL PROTECTED]> > wrote: >> Also, that strikes me as strange that the current philosop

Re: [rspec-users] Shoulda

2008-01-10 Thread David Chelimsky
On Jan 10, 2008 5:50 PM, Nathan Sutton <[EMAIL PROTECTED]> wrote: > Also, that strikes me as strange that the current philosophy is that > for the rspec_on_rails plugin. I would think rails-specific matchers > would be endorsed at some point, since rails is so big on convention. It's actually qui

Re: [rspec-users] Shoulda

2008-01-10 Thread Nathan Sutton
Also, that strikes me as strange that the current philosophy is that for the rspec_on_rails plugin. I would think rails-specific matchers would be endorsed at some point, since rails is so big on convention. Nathan Sutton [EMAIL PROTECTED] rspec 1.1 rspec_on_rails 1.1 rails 2.0.2 On Jan 10,

Re: [rspec-users] Shoulda

2008-01-10 Thread Nathan Sutton
We'll see if I get around to it. It would be a lot of work, I think, and I know a couple people who have started similar efforts. Nathan Sutton [EMAIL PROTECTED] rspec 1.1 rspec_on_rails 1.1 rails 2.0.2 On Jan 10, 2008, at 5:47 PM, Josh Knowles wrote: > On 1/10/08, Nathan Sutton <[EMAIL PROTE

Re: [rspec-users] Shoulda

2008-01-10 Thread Josh Knowles
On 1/10/08, Nathan Sutton <[EMAIL PROTECTED]> wrote: > Hmm, that includes a good number of them, but there's still the > restful resource to think about, which is in my opinion the most > valuable one. Would you consider the addition of a restful resource > matcher similar to shoulda's? Yes. If

Re: [rspec-users] Shoulda

2008-01-10 Thread Nathan Sutton
Hmm, that includes a good number of them, but there's still the restful resource to think about, which is in my opinion the most valuable one. Would you consider the addition of a restful resource matcher similar to shoulda's? Nathan Sutton [EMAIL PROTECTED] rspec 1.1 rspec_on_rails 1.1 rai

Re: [rspec-users] Shoulda

2008-01-10 Thread Josh Knowles
On 1/10/08, Nathan Sutton <[EMAIL PROTECTED]> wrote: > Hey, we're currently using shoulda (http://dev.thoughtbot.com/ > shoulda/) on a project and I saw some things that would be really nice > to see in rspec, namely the should_ methods, and especially the > should_be_restful method. Do these go a

[rspec-users] Shoulda

2008-01-10 Thread Nathan Sutton
Hey, we're currently using shoulda (http://dev.thoughtbot.com/ shoulda/) on a project and I saw some things that would be really nice to see in rspec, namely the should_ methods, and especially the should_be_restful method. Do these go against the rspec goals at all? Or could an ambitious