[rspec-devel] [ rspec-Feature Requests-9983 ] Allow before_setup and after_teardown to be called in BehaviourEval

noreply at rubyforge.org noreply at rubyforge.org
Mon Apr 9 02:29:18 EDT 2007


Feature Requests item #9983, was opened at 2007-04-08 23:29
You can respond by visiting: 
http://rubyforge.org/tracker/?func=detail&atid=3152&aid=9983&group_id=797

Category: None
Group: None
Status: Open
Priority: 3
Submitted By: Brian Takita (btakita)
Assigned to: Nobody (None)
Summary: Allow before_setup and after_teardown to be called in BehaviourEval

Initial Comment:
This would provide a hook for cross cutting.

For example:
Somebody wants to have setup and/or teardown functionality in a select few Examples. One may want to create a module and define the included method.

module Foobar
  def self.included(mod)
    mod.before_setup do
      puts 'my special setup hook'
    end
  end
end

describe MyObject
  include Foobar
end

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

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


More information about the rspec-devel mailing list