Method: Shoulda::Context#initialize
- Defined in:
- lib/shoulda/context.rb
#initialize(name, parent, &blk) ⇒ Context
Returns a new instance of Context.
291 292 293 294 295 296 297 298 299 300 301 302 303 |
# File 'lib/shoulda/context.rb', line 291 def initialize(name, parent, &blk) Shoulda.add_context(self) self.name = name self.parent = parent self.setup_blocks = [] self.teardown_blocks = [] self.shoulds = [] self.should_eventuallys = [] self.subcontexts = [] merge_block(&blk) Shoulda.remove_context end |