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-5.1.3 spec/support/helper.rb
marty-5.1.2 spec/support/helper.rb
marty-5.1.1 spec/support/helper.rb
marty-5.1.0 spec/support/helper.rb
marty-3.1.0 spec/support/helper.rb
marty-3.0.1 spec/support/helper.rb
marty-4.0.0.rc2 spec/support/helper.rb
marty-3.0.0 spec/support/helper.rb
marty-2.9.3 spec/support/helper.rb
marty-2.9.2 spec/support/helper.rb
marty-2.9.1 spec/support/helper.rb
marty-2.8.0 spec/support/helper.rb
marty-2.7.3 spec/support/helper.rb
marty-2.7.2 spec/support/helper.rb
marty-2.7.1 spec/support/helper.rb
marty-2.7.0 spec/support/helper.rb
marty-2.6.8 spec/support/helper.rb
marty-2.6.7 spec/support/helper.rb
marty-2.6.6 spec/support/helper.rb
marty-2.6.5 spec/support/helper.rb