Sha256: c5caa78f9d5a19dc854f7f2ed692f7da855abb17c650f4d44cd4fda9cd657706
Contents?: true
Size: 766 Bytes
Versions: 7
Compression:
Stored size: 766 Bytes
Contents
require 'spec_helper' describe Solve::Solver::Serializer do it "deserializes a serialized solver to an equivalent solver" do graph = Solve::Graph.new graph.artifacts("A", "1.0.0").depends("B", "1.0.0") graph.artifacts("B", "1.0.0").depends("C", "1.0.0") graph.artifacts("C", "1.0.0") demands = [["A", "1.0.0"]] solver = Solve::Solver.new(graph, demands) serializer = Solve::Solver::Serializer.new serialized = serializer.serialize(solver) deserialized = serializer.deserialize(serialized) solver.graph.should eql(deserialized.graph) solver.demands.should eql(deserialized.demands) result = solver.resolve deserialized_result = deserialized.resolve result.should eql(deserialized_result) end end
Version data entries
7 entries across 7 versions & 1 rubygems