Sha256: 9d07997d615bf7911e91b6ea92271e63db4d2ac896262eb65aed65c35074cda8

Contents?: true

Size: 717 Bytes

Versions: 1

Compression:

Stored size: 717 Bytes

Contents

require "spec_helper"

describe SimControl::Scenario do
  it "generates options in -- syntax" do
    scenario = SimControl::Scenario.new foo: "bar", baz: 1
    expect(scenario.options).to eq("--foo bar --baz 1")
  end

  it "generates commands by concatenating" do
    scenario = SimControl::Scenario.new "foo", "bar"
    expect(scenario.commands).to eq("foo bar")
  end

  it "generates the complete arguments string" do
    scenario = SimControl::Scenario.new "foo", "bar", baz: "1", qux: 2
    expect(scenario.args).to eq("foo bar --baz 1 --qux 2")
  end

  it "merges options passed to args in the options" do
    scenario = SimControl::Scenario.new
    expect(scenario.args(seed: 1)).to eq("--seed 1")
  end
end

Version data entries

1 entries across 1 versions & 1 rubygems

Version Path
SimControl-0.1.4 spec/scenario_spec.rb