Sha256: 672802e993499efa903e9d07e3d3431ba2797d119b4dbc26c2c180a74517c827

Contents?: true

Size: 1.01 KB

Versions: 6

Compression:

Stored size: 1.01 KB

Contents

# Order is important.
INSTANCES = [
    Cuboid::Application
]
INSTANCES.each(&:_spec_instances_collect!)

def reset_options
    options = Cuboid::Options
    options.reset

    options.paths.logs      = spec_path + 'support/logs/'
    options.paths.reports   = spec_path + 'support/reports/'
    options.paths.snapshots = spec_path + 'support/snapshots/'
    options.snapshot.path   = options.paths.snapshots

    options.rpc.server_address = '127.0.0.1'

    options
end

def cleanup_instances
    INSTANCES.each do |i|
        i._spec_instances_cleanup
    end
end

def reset_framework
    Cuboid::UI::OutputInterface.initialize
    # Cuboid::UI::Output.debug_on( 999999 )
    # Cuboid::UI::Output.verbose_on
    # Cuboid::UI::Output.mute

    Cuboid::Application.reset
end

def reset_all
    reset_options
    reset_framework
end

def processes_killall
    instance_killall
    dispatcher_killall
    scheduler_killall
    process_killall
    process_kill_reactor
end

def killall
    processes_killall
    web_server_killall
end

Version data entries

6 entries across 6 versions & 1 rubygems

Version Path
cuboid-0.0.5 spec/support/helpers/resets.rb
cuboid-0.0.4 spec/support/helpers/resets.rb
cuboid-0.0.3 spec/support/helpers/resets.rb
cuboid-0.0.3alpha spec/support/helpers/resets.rb
cuboid-0.0.2alpha spec/support/helpers/resets.rb
cuboid-0.0.1alpha spec/support/helpers/resets.rb