Sha256: 30cf3fb3fb11d05abce5b232358bbddfc60b38736b116b094c02653a3d2891ee
Contents?: true
Size: 910 Bytes
Versions: 11
Compression:
Stored size: 910 Bytes
Contents
require File.expand_path(File.dirname(__FILE__) + '/../../spec_helper') include Fathom describe TickSimulation do before do @da = DemoAgent.new end it "should process with n ticks" do @da.should_receive(:on_tick).exactly(3).times.and_return(true) s = TickSimulation.new(@da) s.process(3) end it "should expose the number of ticks designed and executed after processing" do s = TickSimulation.new(@da) s.process(4) s.ticks_designed.should eql(4) s.ticks_executed.should eql(4) end # Any calls coming top down (from the simulator or the agent cluster), will need a standard signature to # make things interchangeable. We use the simulator itself, which is a bit fat, but will work for the short # term. it "should pass the simulator on tick" do s = TickSimulation.new(@da) @da.should_receive(:on_tick).with(s) s.process(1) end end
Version data entries
11 entries across 11 versions & 1 rubygems