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.



9
10
11
# File 'lib/tryouts/test_batch.rb', line 9

def initialize
  @containers_created = 0
end

Instance Method Details

#containers_created_countObject



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

def containers_created_count
  @containers_created
end

#create_containerObject



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

def create_container
  @containers_created += 1
  Object.new
end