[rspec-devel] [ rspec-Patches-15709 ] [PATCH] Have SimpleMatchers expose their description for specdocs

noreply at rubyforge.org noreply at rubyforge.org
Sun Nov 18 20:26:19 EST 2007


Patches item #15709, was opened at 2007-11-17 21:30
You can respond by visiting: 
http://rubyforge.org/tracker/?func=detail&atid=3151&aid=15709&group_id=797

Category: expectation module
Group: None
>Status: Closed
Resolution: None
Priority: 3
Submitted By: Bryan Helmkamp (brynary)
Assigned to: Nobody (None)
Summary: [PATCH] Have SimpleMatchers expose their description for specdocs

Initial Comment:
I'm loving the simplicity of writing custom matchers with SimpleMatcher. The convenience has led me to write very descriptive matchers like "validate_presence_of(attribute)". The result is that the strings I would be passing in to the #it method are identical to my matchers. For example:

it "should validate presence of name" do
  @story.should validate_presence_of(:name)
end

I prefer to shorten these to:

it { @story.should validate_presence_of(:name) }

The problem is that SimpleMatcher doesn't expose it's description instance variable to be used in specdocs.

This simple patch fixes that.

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

Comment By: Chad Humphries (spicycode)
Date: 2007-11-19 01:15

Message:
Moved to http://rspec.lighthouseapp.com/projects/5645-rspec/tickets/16-15709-have-simplematchers-expose-their-description-for-specdocs

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

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


More information about the rspec-devel mailing list