Sha256: c98eaaf100bb466f770212cba25add215438cf57969f0c8f486a47b840957c6f
Contents?: true
Size: 706 Bytes
Versions: 4
Compression:
Stored size: 706 Bytes
Contents
require "spec_helper" describe SimControl::BaseEnvironment do describe "#simulate" do it "calls #execute for each seed" do subject.should_receive(:execute).twice subject.simulate({}, [1, 2]) end it "injects the seed in the arguments hash" do subject.should_receive(:execute) do |args| expect(args[:seed]).to eq(1) end subject.should_receive(:execute) do |args| expect(args[:seed]).to eq(2) end subject.simulate({}, [1, 2]) end it "keeps the arguments hash" do subject.should_receive(:execute) do |args| expect(args[:foo]).to eq("bar") end subject.simulate({foo: "bar"}, [1]) end end end
Version data entries
4 entries across 4 versions & 1 rubygems