Sha256: e2990c752fbf85e83bcaffa1c4e14292aee60f04784cc12d1970653392857912

Contents?: true

Size: 518 Bytes

Versions: 7

Compression:

Stored size: 518 Bytes

Contents

# frozen_string_literal: true

RSpec.describe(ScriptCore::Stat) do
  let(:null_stat) { ScriptCore::Stat::Null }

  it "supports all stats" do
    options = {instructions: 1, memory: 2, bytes_in: 3, time: 4, total_instructions: 5}
    stat = ScriptCore::Stat.new(options)
    expect(stat).to have_attributes(options)
  end

  it "nullStats are all zero" do
    default_values = {instructions: 0, memory: 0, bytes_in: 0, time: 0, total_instructions: 0}
    expect(null_stat).to have_attributes(default_values)
  end
end

Version data entries

7 entries across 7 versions & 1 rubygems

Version Path
script_core-0.1.0 spec/script_core/stat_spec.rb
script_core-0.0.6 spec/script_core/stat_spec.rb
script_core-0.0.5 spec/script_core/stat_spec.rb
script_core-0.0.4 spec/script_core/stat_spec.rb
script_core-0.0.3 spec/script_core/stat_spec.rb
script_core-0.0.2 spec/script_core/stat_spec.rb
script_core-0.0.1 spec/script_core/stat_spec.rb