[rspec-devel] [ rspec-Feature Requests-8654 ] Aspects

noreply at rubyforge.org noreply at rubyforge.org
Wed Feb 14 02:07:55 EST 2007


Feature Requests item #8654, was opened at 2007-02-14 09:07
You can respond by visiting: 
http://rubyforge.org/tracker/?func=detail&atid=3152&aid=8654&group_id=797

Category: runner module
Group: None
Status: Open
Priority: 3
Submitted By: Yurii Rashkovskii (yrashk)
Assigned to: Nobody (None)
Summary: Aspects

Initial Comment:
Specifications become a bit messy in large applications. What if implementing aspects for rspec?

context "New Document instance" do

  setup do
    @document = Document.new
  end 

   aspect "versioning" do

    specify "should have no versions" do
     @document.should_have(0).versions
    end

   end

   aspect "printing" do
     aspect "pdf" do
       ...
     end
   end

 end

New Document instance
- (versioning) should have no versions
- (printing/pdf) ...

Initial implementation (requires ActiveSupport, but could be easily ported to pure Ruby) and more details are available at http://rashkovskii.com/articles/2007/2/13/rspec-aspects

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

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


More information about the rspec-devel mailing list