[rspec-devel] [ rspec-Patches-8994 ] trunk: generated names for be_ specs

noreply at rubyforge.org noreply at rubyforge.org
Sun Mar 4 17:15:46 EST 2007


Patches item #8994, was opened at 2007-03-02 18:41
You can respond by visiting: 
http://rubyforge.org/tracker/?func=detail&atid=3151&aid=8994&group_id=797

Category: expectation module
Group: None
>Status: Open
Resolution: Accepted
Priority: 3
Submitted By: Yurii Rashkovskii (yrashk)
Assigned to: David Chelimsky (dchelimsky)
Summary: trunk: generated names for be_ specs

Initial Comment:
As described at http://blog.railsware.com/2007/3/2/rspec-generated-spec-name-for-be attached you can find an ugly patch for this kind of functionality

----------------------------------------------------------------------

Comment By: Yurii Rashkovskii (yrashk)
Date: 2007-03-03 17:49

Message:
One more patch:

a) be_ predicates with few words (like kind_of) are translating to "kind of" now
b) Be#description preserves used prefix (a or an) if it was used

----------------------------------------------------------------------

Comment By: Yurii Rashkovskii (yrashk)
Date: 2007-03-03 17:46

Message:
One more patch:

a) be_ predicates with few words (like kind_of) are translating to "kind of" now
b) Be#description preserves used prefix (a or an) if it was used

----------------------------------------------------------------------

Comment By: David Chelimsky (dchelimsky)
Date: 2007-03-02 22:13

Message:
Applied to rev 1562.

----------------------------------------------------------------------

Comment By: Yurii Rashkovskii (yrashk)
Date: 2007-03-02 21:36

Message:
Yup, my fault. Here you are a new patch.

----------------------------------------------------------------------

Comment By: David Chelimsky (dchelimsky)
Date: 2007-03-02 20:33

Message:
This looks good.

Although, I'm not comfortable adding these methods to the core classes. It's one thing to do that in your own app - it's another to do it in a tool that interacts with a lot of other apps. RSpec does add some extensions already, but we've pared it down to the bare minimum to avoid conflicts w/ the rest of the world.

I understand that means it becomes more procedural and less OO, but it's a fair tradeoff in my view.

If you want to send one more patch where everything is bottled up in be.rb, I'll be glad to add it. Otherwise I'll adjust on my end.

----------------------------------------------------------------------

Comment By: Yurii Rashkovskii (yrashk)
Date: 2007-03-02 20:12

Message:
Sorry, here you are a full patch :) 

----------------------------------------------------------------------

Comment By: David Chelimsky (dchelimsky)
Date: 2007-03-02 20:08

Message:
Looks like the patch is missing core_ext, which I'm guessing adds to_sentence to Array, no?

----------------------------------------------------------------------

Comment By: Yurii Rashkovskii (yrashk)
Date: 2007-03-02 19:38

Message:
Oops, attaching it again 

----------------------------------------------------------------------

Comment By: David Chelimsky (dchelimsky)
Date: 2007-03-02 19:21

Message:
Please attach the patch ;)

----------------------------------------------------------------------

You can respond by visiting: 
http://rubyforge.org/tracker/?func=detail&atid=3151&aid=8994&group_id=797


More information about the rspec-devel mailing list