Sha256: ab5502001c4fb63c7870fe93c829beedbf9d9469d8033d72b4a48eba02715952

Contents?: true

Size: 668 Bytes

Versions: 4

Compression:

Stored size: 668 Bytes

Contents

#! /usr/bin/ruby
# -*- coding: utf-8 -*-

require 'minitest/spec'
require 'minitest/autorun'
require_relative '../../lib/y_petri'     # tested component itself
# require 'y_petri'
# require 'sy'

describe "Graphviz visualization" do
  before do
    @m = YPetri::Manipulator.new
    @m.Place name: :A, m!: 1
    @m.Place name: :B, m!: 1.5
    @m.Place name: :C, m!: 2
    @m.Place name: :D, m!: 2.5
    @m.Transition name: :A_pump, s: { A: -1 }, rate: proc { 0.005 }
    @m.Transition name: :B_decay, s: { B: -1 }, rate: 0.05
    @m.Transition name: :C_guard, assignment: true, codomain: :C, action: -> { 2 }
  end

  it "should work" do
    @m.net.visualize
  end
end

Version data entries

4 entries across 4 versions & 1 rubygems

Version Path
y_petri-2.1.3 test/acceptance/visualization_test.rb
y_petri-2.0.15 test/acceptance/visualization_test.rb
y_petri-2.0.14.p1 test/acceptance/visualization_test.rb
y_petri-2.0.14 test/acceptance/visualization_test.rb