Sha256: 4fda77c524e3eba0c15d9823fe999706f941d91f5d25de709a09aecda222fc87

Contents?: true

Size: 473 Bytes

Versions: 51

Compression:

Stored size: 473 Bytes

Contents

require 'delorean_lang'

module Marty; module RSpec;
  class Helper
    include Delorean::Model
    # Helper function which increments a global counter.  Can be used by
    # tests which run Delorean code to see how many times some code is
    # being called.  Works for rule scripts as well.
    delorean_fn :global_inc, sig: 1 do |inc|
      @@global_inc ||= 0

      if inc
        @@global_inc += inc
      else
        @@global_inc = 0
      end
    end
  end
end end

Version data entries

51 entries across 51 versions & 1 rubygems

Version Path
marty-14.3.0 spec/support/helper.rb
marty-14.0.0 spec/support/helper.rb
marty-13.0.2 spec/support/helper.rb
marty-11.0.0 spec/support/helper.rb
marty-10.0.3 spec/support/helper.rb
marty-10.0.2 spec/support/helper.rb
marty-10.0.0 spec/support/helper.rb
marty-9.5.1 spec/support/helper.rb
marty-9.5.0 spec/support/helper.rb
marty-9.3.3 spec/support/helper.rb
marty-9.3.2 spec/support/helper.rb
marty-9.3.0 spec/support/helper.rb
marty-8.5.0 spec/support/helper.rb
marty-8.4.1 spec/support/helper.rb
marty-8.3.1 spec/support/helper.rb
marty-8.2.0 spec/support/helper.rb
marty-8.0.0 spec/support/helper.rb
marty-6.1.0 spec/support/helper.rb
marty-5.2.0 spec/support/helper.rb
marty-5.1.4 spec/support/helper.rb