Re: [rspec-users] Reason for _spec.rb convention

2007-09-11 Thread Robert Evans
Just to throw one more opinion into the pot, you can mimic how rails
handles views and do:

account.spec.rb

Just a thought.

Robert

On 9/5/07, M. Edward (Ed) Borasky [EMAIL PROTECTED] wrote:
 -BEGIN PGP SIGNED MESSAGE-
 Hash: SHA1

 Ashley Moran wrote:
  On 4 Sep 2007, at 23:36, Dan North wrote:
 
  C-hash
 
  I think you meant C-pound...
  http://worsethanfailure.com/Articles/5_years_C-pound_experience.aspx
 
 
  ___
  rspec-users mailing list
  rspec-users@rubyforge.org
  http://rubyforge.org/mailman/listinfo/rspec-users
 

 No, #| (hash-pipe)

 #! (shebang)

 # aka ... octothorpe ... pound sign ... sharp ... number sign

 !!maxwellssilverhammer

 etc. ...
 -BEGIN PGP SIGNATURE-
 Version: GnuPG v1.4.7 (GNU/Linux)
 Comment: Using GnuPG with Mozilla - http://enigmail.mozdev.org

 iD8DBQFG3rxD8fKMegVjSM8RAuQWAKCBI7HxxpRpd5tTfHgv+0ovbIRXHACgklhE
 jTg8zGSBsT4zXNzGFEDUksY=
 =KITf
 -END PGP SIGNATURE-
 ___
 rspec-users mailing list
 rspec-users@rubyforge.org
 http://rubyforge.org/mailman/listinfo/rspec-users



-- 

Robert R Evans
http://robertrevans.com
http://rubysnips.com
___
rspec-users mailing list
rspec-users@rubyforge.org
http://rubyforge.org/mailman/listinfo/rspec-users


Re: [rspec-users] Reason for _spec.rb convention

2007-09-05 Thread Ashley Moran

On 4 Sep 2007, at 23:36, Dan North wrote:

 If we come up with a programming language-independent way of  
 representing specs, then I'm all for a .spec suffix. (Perhaps the  
 specdoc descriptions might be something along those lines.)

Good point.  I did consider suggesting .rspec as an extention for  
that reason.  Think I will stick to _spec.rb for now.



___
rspec-users mailing list
rspec-users@rubyforge.org
http://rubyforge.org/mailman/listinfo/rspec-users


Re: [rspec-users] Reason for _spec.rb convention

2007-09-05 Thread Ashley Moran

On 4 Sep 2007, at 23:36, Dan North wrote:

 C-hash

I think you meant C-pound...
http://worsethanfailure.com/Articles/5_years_C-pound_experience.aspx


___
rspec-users mailing list
rspec-users@rubyforge.org
http://rubyforge.org/mailman/listinfo/rspec-users


Re: [rspec-users] Reason for _spec.rb convention

2007-09-05 Thread M. Edward (Ed) Borasky
-BEGIN PGP SIGNED MESSAGE-
Hash: SHA1

Ashley Moran wrote:
 On 4 Sep 2007, at 23:36, Dan North wrote:
 
 C-hash
 
 I think you meant C-pound...
 http://worsethanfailure.com/Articles/5_years_C-pound_experience.aspx
 
 
 ___
 rspec-users mailing list
 rspec-users@rubyforge.org
 http://rubyforge.org/mailman/listinfo/rspec-users
 

No, #| (hash-pipe)

#! (shebang)

# aka ... octothorpe ... pound sign ... sharp ... number sign

!!maxwellssilverhammer

etc. ...
-BEGIN PGP SIGNATURE-
Version: GnuPG v1.4.7 (GNU/Linux)
Comment: Using GnuPG with Mozilla - http://enigmail.mozdev.org

iD8DBQFG3rxD8fKMegVjSM8RAuQWAKCBI7HxxpRpd5tTfHgv+0ovbIRXHACgklhE
jTg8zGSBsT4zXNzGFEDUksY=
=KITf
-END PGP SIGNATURE-
___
rspec-users mailing list
rspec-users@rubyforge.org
http://rubyforge.org/mailman/listinfo/rspec-users


Re: [rspec-users] Reason for _spec.rb convention

2007-09-04 Thread Ashley Moran

On 3 Sep 2007, at 15:03, David Chelimsky wrote:

 Not used Autotest

 You SHOULD!

Why do I have a feeling I will now try it out and go WHY OH WHY  
DIDN'T I USE THIS BEFORE???


___
rspec-users mailing list
rspec-users@rubyforge.org
http://rubyforge.org/mailman/listinfo/rspec-users


Re: [rspec-users] Reason for _spec.rb convention

2007-09-04 Thread Dan North

Ashley Moran wrote:

On 3 Sep 2007, at 15:37, David Chelimsky wrote:

  

But it is an interesting idea that we should stay open to. Perhaps
more compelling reasons for such a change will appear in the future.




I like the sound of .spec in a way.  It shortens the filenames which  
is always a bonus for TM users.  I can see the issue with file  
associations, but it's easy enough to change these for TextMate.   
(Although, allegedly, there are some Ruby developers that don't use  
TextMate.)


In favour of .spec, Rake has its own extension (.rake).  You could  
argue that RSpec is not much more tied to Ruby code than Rake is.
  
Ruby isn't the only language where BDD is being used. sheep_spec.rb says 
to me: this is a behaviour spec(ification) in Ruby for a sheep. 
SheepSpec.java or SheepSpec.cs says the same for Java or C-hash.


If we come up with a programming language-independent way of 
representing specs, then I'm all for a .spec suffix. (Perhaps the 
specdoc descriptions might be something along those lines.)

Ashley

Cheers,
Dan
___
rspec-users mailing list
rspec-users@rubyforge.org
http://rubyforge.org/mailman/listinfo/rspec-users

Re: [rspec-users] Reason for _spec.rb convention

2007-09-03 Thread Wincent Colaiuta
El 3/9/2007, a las 13:59, Ashley Moran escribió:

 Hi

 Easy one - I just wondered why all spec files for rspec_on_rails end
 _spec.rb instead of just .rb?  They are all inside the spec
 folder so surely the fact they are specs is implicit?

 Ashley

I know it's very application-specific, but one good reason for this  
is that it makes finding files in TextMate much easier when you hit  
Command-T; you type a few characters and at a glance can distinguish  
between spec and implementation files.

Cheers,
Wincent

___
rspec-users mailing list
rspec-users@rubyforge.org
http://rubyforge.org/mailman/listinfo/rspec-users


Re: [rspec-users] Reason for _spec.rb convention

2007-09-03 Thread Scott Taylor

On Sep 3, 2007, at 7:59 AM, Ashley Moran wrote:

 Hi

 Easy one - I just wondered why all spec files for rspec_on_rails end
 _spec.rb instead of just .rb?  They are all inside the spec
 folder so surely the fact they are specs is implicit?


Personally, I think the only reason we keep it around is for  
Autotest, which maps xyz_spec.rb = xyz.rb.  But - Feel free to name  
your specs however you choose.

Scott
___
rspec-users mailing list
rspec-users@rubyforge.org
http://rubyforge.org/mailman/listinfo/rspec-users


Re: [rspec-users] Reason for _spec.rb convention

2007-09-03 Thread Scott Taylor

On Sep 3, 2007, at 7:59 AM, Ashley Moran wrote:

 Hi

 Easy one - I just wondered why all spec files for rspec_on_rails end
 _spec.rb instead of just .rb?  They are all inside the spec
 folder so surely the fact they are specs is implicit?


Personally, I think the only reason we keep it around is for  
Autotest, which maps xyz_spec.rb = xyz.rb.  But - Feel free to name  
your specs however you choose.

Scott
___
rspec-users mailing list
rspec-users@rubyforge.org
http://rubyforge.org/mailman/listinfo/rspec-users


Re: [rspec-users] Reason for _spec.rb convention

2007-09-03 Thread Ashley Moran

On 3 Sep 2007, at 13:47, Wincent Colaiuta wrote:

 I know it's very application-specific, but one good reason for this
 is that it makes finding files in TextMate much easier when you hit
 Command-T; you type a few characters and at a glance can distinguish
 between spec and implementation files.

This makes sense!  However, after a bit of testing, it turns out  
TextMate identifies the shortest unique path, so if you have  
address.rb in app/models and spec/models, it displays this in the Cmd- 
T window:

   address.rb – app/models
   address.rb – spec/models

TextMate's interface never ceases to amaze me.

I suppose also you could set up a spec runner to skip files not  
ending _spec.rb in case you wanted support code in the spec folders  
(not sure if this is a good idea in practice or not, just occurred to  
me).



On 3 Sep 2007, at 13:50, Scott Taylor wrote:
 Personally, I think the only reason we keep it around is for
 Autotest, which maps xyz_spec.rb = xyz.rb.  But - Feel free to name
 your specs however you choose.

Not used Autotest - I'm sure it could be made to map xyz.rb = xyz.rb  
too though.


This satisfied my curiosity anyway - someone mentioned it on nitro- 
general and I realised I didn't know where _spec came from.

Thanks
Ashley
___
rspec-users mailing list
rspec-users@rubyforge.org
http://rubyforge.org/mailman/listinfo/rspec-users


Re: [rspec-users] Reason for _spec.rb convention

2007-09-03 Thread David Chelimsky
On 9/3/07, Scott Taylor [EMAIL PROTECTED] wrote:

 On Sep 3, 2007, at 7:59 AM, Ashley Moran wrote:

  Hi
 
  Easy one - I just wondered why all spec files for rspec_on_rails end
  _spec.rb instead of just .rb?  They are all inside the spec
  folder so surely the fact they are specs is implicit?
 

 Personally, I think the only reason we keep it around is for
 Autotest, which maps xyz_spec.rb = xyz.rb.  But - Feel free to name
 your specs however you choose.

The autotest mapping you speak of ships with rspec, not ZenTest, so if
we chose to rename the files there would be no problem.


 Scott
 ___
 rspec-users mailing list
 rspec-users@rubyforge.org
 http://rubyforge.org/mailman/listinfo/rspec-users

___
rspec-users mailing list
rspec-users@rubyforge.org
http://rubyforge.org/mailman/listinfo/rspec-users


Re: [rspec-users] Reason for _spec.rb convention

2007-09-03 Thread Pat Maddox
On 9/3/07, David Chelimsky [EMAIL PROTECTED] wrote:
 On 9/3/07, Ashley Moran [EMAIL PROTECTED] wrote:
  Hi
 
  Easy one - I just wondered why all spec files for rspec_on_rails end
  _spec.rb instead of just .rb?  They are all inside the spec
  folder so surely the fact they are specs is implicit?

 For me, personally, if I'm in TextMate and I see a row of tabs that say:

 thing.rb|thing_controller.rb|thing_controller.rb|thing.rb

 I'm going to be confused by that. It also makes searching for the file
 that much more complicated because you have to start looking for the
 folder when you search for thing.rb instead of just looking for the
 filename.

 Thoughts about that?

From a practical standpoint, _spec is there because it allows me to
distinguish files at a glance.

From a philosophical standpoint, .rb is there because I'm writing
specifications that just happen to be implemented in Ruby.  (no I
would not suggest in a million years that the files be changed to
.spec.  That's silly)

Pat
___
rspec-users mailing list
rspec-users@rubyforge.org
http://rubyforge.org/mailman/listinfo/rspec-users


Re: [rspec-users] Reason for _spec.rb convention

2007-09-03 Thread Pat Maddox
On 9/3/07, David Chelimsky [EMAIL PROTECTED] wrote:
 On 9/3/07, Pat Maddox [EMAIL PROTECTED] wrote:
  On 9/3/07, David Chelimsky [EMAIL PROTECTED] wrote:
   On 9/3/07, Ashley Moran [EMAIL PROTECTED] wrote:
Hi
   
Easy one - I just wondered why all spec files for rspec_on_rails end
_spec.rb instead of just .rb?  They are all inside the spec
folder so surely the fact they are specs is implicit?
  
   For me, personally, if I'm in TextMate and I see a row of tabs that say:
  
   thing.rb|thing_controller.rb|thing_controller.rb|thing.rb
  
   I'm going to be confused by that. It also makes searching for the file
   that much more complicated because you have to start looking for the
   folder when you search for thing.rb instead of just looking for the
   filename.
  
   Thoughts about that?
 
  From a practical standpoint, _spec is there because it allows me to
  distinguish files at a glance.
 
  From a philosophical standpoint, .rb is there because I'm writing
  specifications that just happen to be implemented in Ruby.  (no I
  would not suggest in a million years that the files be changed to
  .spec.  That's silly)

 Can't tell if you're being serious or sarcastic here. Is it really
 silly? If so, why? Maybe you're on to something here.

It's not actually silly.  In fact some time last year I made all my
specs end in .spec instead of .rb.  The only potential problem is
integration with tools, which all know how to handle .rb files.
Though of course those can be configured.

I don't have a personal preference really.  If others feel that naming
them .spec better conveys the idea of executable specs that happen to
be implemented in Ruby then cool. It's silly, to me, in the sense
that I don't think it warrants much thought.

otoh maybe I need to be more forward-thinking in that regard.  RSpec
works on JRuby, and developers could conceivably use RSpec to drive
their Java-only code.  RSpec obviously has the makings of a general
specification library and I wouldn't be surprised if bindings pop up
for other languages now that the core is stable.

So I guess I just talked myself into .spec :)

Pat
___
rspec-users mailing list
rspec-users@rubyforge.org
http://rubyforge.org/mailman/listinfo/rspec-users