Module: RSpecSubjectExtensions::ClassMethods
- Defined in:
- lib/rspec-subject-extensions/class_methods.rb
Instance Method Summary collapse
-
#each(attribute = nil) { ... } ⇒ Object
Creates a nested example group named by
eachand the submittedattribute, or theinstancesthemselves if none given, and then generates an example for each of them using the submitted block.
Instance Method Details
#each(attribute = nil) { ... } ⇒ Object
Creates a nested example group named by each and the submitted attribute, or the instances themselves if none given, and then generates an example for each of them using the submitted block.
52 53 54 55 56 57 58 |
# File 'lib/rspec-subject-extensions/class_methods.rb', line 52 def each(attribute = nil, &block) if attribute each_with_attribute(attribute, &block) else each_without_attribute(&block) end end |