Re: [rspec-users] Getting Class in Shared Behaviours

2007-11-22 Thread Nathan Sutton
Bah, I won't have time to do this anytime soon, you can feel free, Scott. Nathan Sutton [EMAIL PROTECTED] rspec edge revision 2944 rspec_on_rails edge revision 2944 rails edge revision 8186 On Nov 21, 2007, at 10:25 PM, Scott Taylor wrote: > > On Nov 21, 2007, at 11:14 PM, Ben Mabey wrote: >

Re: [rspec-users] Getting Class in Shared Behaviours

2007-11-21 Thread Scott Taylor
On Nov 21, 2007, at 11:14 PM, Ben Mabey wrote: > I like what Scott suggested. > > it_should_behave_like "a foo", :with => { ... } > > Might read a little better. But I like the idea of it just taking > a hash. > The obvious problem with this approach is that it will crowd the namespace (dec

Re: [rspec-users] Getting Class in Shared Behaviours

2007-11-21 Thread Ben Mabey
I like what Scott suggested. it_should_behave_like "a foo", :with => { ... } Might read a little better. But I like the idea of it just taking a hash. -Ben Nathan Sutton wrote: > Anyone else have any opinions on this? I'd like to get some more input. > > Thanks, > > Nathan Sutton > [EMAIL PR

Re: [rspec-users] Getting Class in Shared Behaviours

2007-11-21 Thread Nathan Sutton
Anyone else have any opinions on this? I'd like to get some more input. Thanks, Nathan Sutton [EMAIL PROTECTED] rspec edge revision 2910 rspec_on_rails edge revision 2909 rails edge revision 8175 On Nov 21, 2007, at 4:58 PM, Scott Taylor wrote: > > On Nov 21, 2007, at 5:42 PM, Nathan Sutton

Re: [rspec-users] Getting Class in Shared Behaviours

2007-11-21 Thread Scott Taylor
On Nov 21, 2007, at 5:42 PM, Nathan Sutton wrote: > Not even sure, what are your thoughts? > > Nathan Sutton > [EMAIL PROTECTED] > rspec edge revision 2910 > rspec_on_rails edge revision 2909 > rails edge revision 8175 > I'd like to see something like this: it_should_behave_like "a foo", :vari

Re: [rspec-users] Getting Class in Shared Behaviours

2007-11-21 Thread Nathan Sutton
Not even sure, what are your thoughts? Nathan Sutton [EMAIL PROTECTED] rspec edge revision 2910 rspec_on_rails edge revision 2909 rails edge revision 8175 On Nov 21, 2007, at 4:31 PM, Scott Taylor wrote: > > On Nov 21, 2007, at 5:16 PM, Nathan Sutton wrote: > >> Ooh, I totally want to do this,

Re: [rspec-users] Getting Class in Shared Behaviours

2007-11-21 Thread Nathan Sutton
Oh, and the reason I include this is because it's always a question when discussing things, and this makes it always available, both to those reading now and those who may read these conversations in the future. Nathan Sutton [EMAIL PROTECTED] rspec edge revision 2910 rspec_on_rails edge rev

Re: [rspec-users] Getting Class in Shared Behaviours

2007-11-21 Thread Scott Taylor
On Nov 21, 2007, at 5:16 PM, Nathan Sutton wrote: > Ooh, I totally want to do this, I'll work on it this week along with > my other patch i have yet to submit this week, unless Scott is partial > to doing it. Do you want it, Scott? Go for it. Let me know if you don't want it. What is the synt

Re: [rspec-users] Getting Class in Shared Behaviours

2007-11-21 Thread Scott Taylor
On Nov 21, 2007, at 5:31 PM, David Chelimsky wrote: > On Nov 21, 2007 4:16 PM, Nathan Sutton <[EMAIL PROTECTED]> > wrote: >> Nathan Sutton >> [EMAIL PROTECTED] >> rspec edge revision 2910 >> rspec_on_rails edge revision 2909 >> rails edge revision 8175 > > Have you added this to your signature?

Re: [rspec-users] Getting Class in Shared Behaviours

2007-11-21 Thread Nathan Sutton
Yeah, I'm currently doing it manually though, and this email is only for mailing lists. Nathan Sutton [EMAIL PROTECTED] rspec edge revision 2910 rspec_on_rails edge revision 2909 rails edge revision 8175 On Nov 21, 2007, at 4:31 PM, David Chelimsky wrote: > On Nov 21, 2007 4:16 PM, Nathan Su

Re: [rspec-users] Getting Class in Shared Behaviours

2007-11-21 Thread David Chelimsky
On Nov 21, 2007 4:16 PM, Nathan Sutton <[EMAIL PROTECTED]> wrote: > Nathan Sutton > [EMAIL PROTECTED] > rspec edge revision 2910 > rspec_on_rails edge revision 2909 > rails edge revision 8175 Have you added this to your signature ___ rspec-users mail

Re: [rspec-users] Getting Class in Shared Behaviours

2007-11-21 Thread Nathan Sutton
Ooh, I totally want to do this, I'll work on it this week along with my other patch i have yet to submit this week, unless Scott is partial to doing it. Do you want it, Scott? Nathan Sutton [EMAIL PROTECTED] rspec edge revision 2910 rspec_on_rails edge revision 2909 rails edge revision 8175

Re: [rspec-users] Getting Class in Shared Behaviours

2007-11-21 Thread David Chelimsky
On Nov 21, 2007 3:53 PM, Scott Taylor <[EMAIL PROTECTED]> wrote: > > On Nov 21, 2007, at 4:22 PM, David Chelimsky wrote: > > > > On Nov 21, 2007 3:14 PM, Daniel N <[EMAIL PROTECTED]> wrote: > >> Hi, > >> > >> I want to be able to get at the described class in my shared > >> behaviour. I'm > >> sur

Re: [rspec-users] Getting Class in Shared Behaviours

2007-11-21 Thread Scott Taylor
On Nov 21, 2007, at 4:22 PM, David Chelimsky wrote: > On Nov 21, 2007 3:14 PM, Daniel N <[EMAIL PROTECTED]> wrote: >> Hi, >> >> I want to be able to get at the described class in my shared >> behaviour. I'm >> sure an example will say it better than my words >> >> describe "my shared", :shared

Re: [rspec-users] Getting Class in Shared Behaviours

2007-11-21 Thread Nathan Sutton
Some of this clears up my issues around sharing behaviors that you can pass parameters to. I was doing a hackish solution before by including a module then calling a method it provides, but now I can have shared behaviors and just have them call specific methods which then become a convent

Re: [rspec-users] Getting Class in Shared Behaviours

2007-11-21 Thread Daniel N
On Nov 22, 2007 8:31 AM, aslak hellesoy <[EMAIL PROTECTED]> wrote: > On Nov 21, 2007 10:22 PM, David Chelimsky <[EMAIL PROTECTED]> wrote: > > > > On Nov 21, 2007 3:14 PM, Daniel N <[EMAIL PROTECTED]> wrote: > > > Hi, > > > > > > I want to be able to get at the described class in my shared > behavi

Re: [rspec-users] Getting Class in Shared Behaviours

2007-11-21 Thread aslak hellesoy
On Nov 21, 2007 10:22 PM, David Chelimsky <[EMAIL PROTECTED]> wrote: > > On Nov 21, 2007 3:14 PM, Daniel N <[EMAIL PROTECTED]> wrote: > > Hi, > > > > I want to be able to get at the described class in my shared behaviour. I'm > > sure an example will say it better than my words > > > > describe "m

Re: [rspec-users] Getting Class in Shared Behaviours

2007-11-21 Thread Nathan Sutton
David to the rescue! :) Nathan Sutton [EMAIL PROTECTED] rspec edge revision 2910 rspec_on_rails edge revision 2909 rails edge revision 8175 On Nov 21, 2007, at 3:22 PM, David Chelimsky wrote: > On Nov 21, 2007 3:14 PM, Daniel N <[EMAIL PROTECTED]> wrote: >> Hi, >> >> I want to be able to get a

Re: [rspec-users] Getting Class in Shared Behaviours

2007-11-21 Thread Daniel N
On Nov 22, 2007 8:22 AM, David Chelimsky <[EMAIL PROTECTED]> wrote: > On Nov 21, 2007 3:14 PM, Daniel N <[EMAIL PROTECTED]> wrote: > > Hi, > > > > I want to be able to get at the described class in my shared behaviour. > I'm > > sure an example will say it better than my words > > > > describe "m

Re: [rspec-users] Getting Class in Shared Behaviours

2007-11-21 Thread David Chelimsky
On Nov 21, 2007 3:14 PM, Daniel N <[EMAIL PROTECTED]> wrote: > Hi, > > I want to be able to get at the described class in my shared behaviour. I'm > sure an example will say it better than my words > > describe "my shared", :shared => true do > > it "should tell me what the class is its describi

Re: [rspec-users] Getting Class in Shared Behaviours

2007-11-21 Thread Daniel N
yep should == User expected: User, got: # (using ==) On Nov 22, 2007 8:15 AM, Nathan Sutton <[EMAIL PROTECTED]> wrote: > Did you try self.class > > ?? > Nathan Sutton > [EMAIL PROTECTED] > rspec edge revision 2910 > rspec_on_rails edge revision 2909 > rails edge revision 8175 > > > > On Nov

Re: [rspec-users] Getting Class in Shared Behaviours

2007-11-21 Thread Nathan Sutton
Did you try self.class ?? Nathan Sutton [EMAIL PROTECTED] rspec edge revision 2910 rspec_on_rails edge revision 2909 rails edge revision 8175 On Nov 21, 2007, at 3:14 PM, Daniel N wrote: > Hi, > > I want to be able to get at the described class in my shared > behaviour. I'm sure an example

[rspec-users] Getting Class in Shared Behaviours

2007-11-21 Thread Daniel N
Hi, I want to be able to get at the described class in my shared behaviour. I'm sure an example will say it better than my words describe "my shared", :shared => true do it "should tell me what the class is its describing" do how_do_i_get_the_user_class_here end end describe User do