Re: [rspec-users] Deprecating the mocking framework?

2007-09-05 Thread Christoph Sturm
everybody in this thread is reacting like you are about to remove the
built in mocking. The idea was to deprecate it, something like

if you use the build in mocking right now, fine. If you start a new
project dont use it

One thing is clear, mocha is much nicer than the integrated mocking,
nicer syntax, better errormessages, better everything. The rspec
mocking framework could never compete with mocha or flexmock on its
own. At the time it was created there were good reasons for that, just
like there are good reasons to deprecate it now.

No one should be forced to migrate an old project over to new mocks,
but thats not what we are talking about.

Maybe you should just keep the built in mocking, but recommend mocha
for new projects, and start using mocha for the samples and generated
specs.

I recognize that some people like flexmock better, but having one
recommended framework would make it much easier for people to get
started. (It will almost feel like mocha was built in :P)

It really feels strange to hear these complains about rspec not having
everything built in, because the main complain for me and others about
rspec was always that its too big and has its own mocking that you
have to use. (This is fixed now and rspec plays very nice with mocha,
great)

regards
 christoph
On 9/3/07, David Chelimsky [EMAIL PROTECTED] wrote:
 Hi all,

 I've talked this over w/ a couple of the other committers and we've
 decided that we will NOT be deprecating the mock framework, at least
 for the foreseeable future. If/when we do, it will happen with plenty
 of notice and a clear, painless (as much as is possible) upgrade path.

 To be clear: this decision is purely pragmatic. Benefits of the
 existing framework cited in this thread are significant (one-stop
 shop, generated specs for the rails plugin, etc). And the amount of
 work it would take to do it right (backwards compatibility, easy
 upgrade path, support for multiple external frameworks, etc) far
 exceeds the perceived cost of maintaining the existing framework.

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



-- 
[EMAIL PROTECTED]
___
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] response.should render_layout ....

2007-09-05 Thread Jonathan Linowes
Here's how I did it

http://rubyforge.org/pipermail/rspec-users/2007-May/001818.html

linoj


On Sep 5, 2007, at 9:58 AM, Ingo Weiss wrote:

 Hi,

 is there a way to assert in rspec that a template is rendered in a
 specific layout?

 Thanks!
 Ingo
 ___
 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] Deprecating the mocking framework?

2007-09-05 Thread Jay Levitt
Lance Carlson wrote:
 If core was to deprecate the included mocking framework, then why
 would they favor mocha over flexmock? I agree we need to have some
 agreement as to which one to use, but why the favoritism?

If my grandmother had wheels, would she be a skateboard?

They're not deprecating it.. we don't need to choose which one we would 
potentially hypothetically someday choose.

Jay

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


[rspec-users] False Positives and Autotest on New Folders

2007-09-05 Thread Geoffrey Wiseman
False Positives
I just discovered how easy it was to create a false positive when I, trying
my first RSpec test, did this:
   ob.should eql?('foo')
instead of:
   ob.should eql('foo')
or:
   ob.should == 'foo'

As far as I can see, this is roughly equivalent to:
  ob.should false

Neither eql?('foo') nor false causes the spec to fail; this is worrisome, as
I can imagine accidentally including that ? again; and I'd hate it to mask a
test failure.

Autotest
Out of curiosity, does anyone know how to get autotest to pick up new
folders under spec/?  Seems like I might have to modify rails_rspec.rb in
lib/autotest.  We were considering separating our acceptance tests from the
rest.

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

Re: [rspec-users] Deprecating the mocking framework?

2007-09-05 Thread Wilson Bilkovich
On 9/5/07, Christoph Sturm [EMAIL PROTECTED] wrote:
 everybody in this thread is reacting like you are about to remove the
 built in mocking. The idea was to deprecate it, something like

 if you use the build in mocking right now, fine. If you start a new
 project dont use it

 One thing is clear, mocha is much nicer than the integrated mocking,
 nicer syntax, better errormessages, better everything. The rspec
 mocking framework could never compete with mocha or flexmock on its
 own. At the time it was created there were good reasons for that, just
 like there are good reasons to deprecate it now.


I would be 100% OK with this for version 1.1 or 1.2 or whatever, as
long as Mocha was the only 'recommendation', and the rspec gem had a
listed gem dependency on Mocha.
It's the 'choice' I object to, not the specifics of which mock
framework we happen to use.
___
rspec-users mailing list
rspec-users@rubyforge.org
http://rubyforge.org/mailman/listinfo/rspec-users


Re: [rspec-users] Deprecating the mocking framework?

2007-09-05 Thread Wilson Bilkovich
On 9/5/07, Steven R. Baker [EMAIL PROTECTED] wrote:
 Wilson Bilkovich wrote:
  On 9/5/07, Christoph Sturm [EMAIL PROTECTED] wrote:
 
  everybody in this thread is reacting like you are about to remove the
  built in mocking. The idea was to deprecate it, something like
 
  if you use the build in mocking right now, fine. If you start a new
  project dont use it
 
  One thing is clear, mocha is much nicer than the integrated mocking,
  nicer syntax, better errormessages, better everything. The rspec
  mocking framework could never compete with mocha or flexmock on its
  own. At the time it was created there were good reasons for that, just
  like there are good reasons to deprecate it now.
 
 
 
  I would be 100% OK with this for version 1.1 or 1.2 or whatever, as
  long as Mocha was the only 'recommendation', and the rspec gem had a
  listed gem dependency on Mocha.
  It's the 'choice' I object to, not the specifics of which mock
  framework we happen to use.
 
 To clarify, you just want a default mock framework, instead of being
 forced to make the decision yourself?


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


Re: [rspec-users] False Positives and Autotest on New Folders

2007-09-05 Thread David Chelimsky
On 9/5/07, Geoffrey Wiseman [EMAIL PROTECTED] wrote:
 False Positives
 I just discovered how easy it was to create a false positive when I, trying
 my first RSpec test, did this:
ob.should eql?('foo')
 instead of:
ob.should eql('foo')
 or:
ob.should == 'foo'

 As far as I can see, this is roughly equivalent to:
   ob.should false

 Neither eql?('foo') nor false causes the spec to fail; this is worrisome, as
 I can imagine accidentally including that ? again; and I'd hate it to mask a
 test failure.

Please report bugs to http://rubyforge.org/tracker/index.php?group_id=797


 Autotest
 Out of curiosity, does anyone know how to get autotest to pick up new
 folders under spec/?  Seems like I might have to modify rails_rspec.rb in
 lib/autotest.  We were considering separating our acceptance tests from the
 rest.

   - Geoffrey
 --
 Geoffrey Wiseman

 ___
 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] Caveman Questions

2007-09-05 Thread David Chelimsky
On 9/5/07, sudara [EMAIL PROTECTED] wrote:

 Hello!

 I'm just a caveman with some caveman questions.

 I've been parsing Rspec for quite a while, and I'm writing my first series
 of specs. My initial impressions are Verbose, but understandable. Helpful
 and intuitive, but so much to digest. I want to congratulate the folks who
 are dedicating a chunk of their lives to writing this, and ask 2 caveman
 questions

 My first is Why lambda in rpsec? It doesn't strike me as reads like
 english or easily understandable. I understand it's place in ruby (um,
 kind of :), but my thinking is:

 lambda { do_something_risky }.should raise_error

 would be more understandable (and fun!) written as:

 running { something_risky }.should raise_error

That's a great idea. Why don't you add it to the tracker:

http://rubyforge.org/tracker/index.php?group_id=797


 My second question is: For those folks who are getting up to speed with ruby
 and rails AND digesting rspec along the way, there is a lot of incoming DSL.
 As I started with rails before rspec, I found myself using script/console to
 check my code, poking at different ways of expressing myself with ruby.

 Is there a way to poke at my specs? I can load up my test environment, but
 can I spec things live so that I can find out what works and what doesn't?
 I find I'm wasting a chunk of time (as I don't have the DSL even 60% down)
 writing specs and getting it wrong. Am I missing a trick, or I.should_have
 dsl_down_before_trying.else_return(crying)?

irb(main):001:0 require 'rubygems'
= true
irb(main):002:0 require 'spec'
= true
irb(main):003:0 include Spec::Matchers
= Object
irb(main):004:0 5.should == 5
= nil
irb(main):005:0 5.should be  4
Spec::Expectations::ExpectationNotMetError: expected  4, got 5

Cheers,
David


 um, thanks for any potential caveman responses - the more caveman
 (pragmatic) the better.

 sudara


 --
 View this message in context: 
 http://www.nabble.com/Caveman-Questions-tf4384357.html#a12498949
 Sent from the rspec-users mailing list archive at Nabble.com.

 ___
 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