[rspec-devel] [ rspec-Feature Requests-10781 ] Hierarchical specdoc output for shared behaviors

noreply at rubyforge.org noreply at rubyforge.org
Fri May 11 13:17:43 EDT 2007


Feature Requests item #10781, was opened at 2007-05-11 10:17
You can respond by visiting: 
http://rubyforge.org/tracker/?func=detail&atid=3152&aid=10781&group_id=797

Category: reports
Group: None
Status: Open
Priority: 3
Submitted By: Greg Spurrier (gregspurrier)
Assigned to: Nobody (None)
Summary: Hierarchical specdoc output for shared behaviors 

Initial Comment:
When shared behaviors are included into a behavior, there is no indication of the source of the behavior in the specdoc output.  This can be confusing when multiple shared behaviors are included and have similar examples.  E.g.:

describe "REST index action", :shared => true do
  it "should return status code 200" do
  end
end

describe "REST show action", :shared => true do
  it "should return status code 200" do
  end
end

describe "FooController" do
  it_should_behave_like "REST index action"
  it_should_behave_like "REST show action"
end

gives the following output with 0.9.4:

% spec -fs a_spec.rb 

FooController
- should return status code 200
- should return status code 200

It would be better, IMHO, if it looked like:

FooController
- should behave like REST index action and:
  - should return status code 200
- should behave like REST show action and:
  - should return status code 200

What do you guys think?

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

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


More information about the rspec-devel mailing list