Class: Tryouts::FreshContextFactory

Inherits:
Object
  • Object
show all
Defined in:
lib/tryouts/test_batch.rb

Overview

Factory for creating fresh context containers for each test

Instance Method Summary collapse

Constructor Details

#initializeFreshContextFactory

Returns a new instance of FreshContextFactory.



12
13
14
# File 'lib/tryouts/test_batch.rb', line 12

def initialize
  @containers_created = 0
end

Instance Method Details

#containers_created_countObject



21
22
23
# File 'lib/tryouts/test_batch.rb', line 21

def containers_created_count
  @containers_created
end

#create_containerObject



16
17
18
19
# File 'lib/tryouts/test_batch.rb', line 16

def create_container
  @containers_created += 1
  Object.new
end