diff --git a/test/circuit_test.rb b/test/circuit_test.rb index 3f8eb1f..d89d25d 100644 --- a/test/circuit_test.rb +++ b/test/circuit_test.rb @@ -20,11 +20,11 @@ class CircuitTest < Minitest::Spec last_signal, (ctx, i, j, *bla) = circuit.([ctx, 1, 2], task: Start) - expect(ctx.inspect).must_equal %{{:start=>1, :a=>2, :b=>3, :_end=>4}} - expect(last_signal).must_equal "the end" - expect(i).must_equal 1 - expect(j).must_equal 2 - expect(bla).must_equal [] + assert_equal ctx.inspect, %{{:start=>1, :a=>2, :b=>3, :_end=>4}} + assert_equal last_signal, "the end" + assert_equal i, 1 + assert_equal j, 2 + assert_equal bla, [] # --- @@ -33,7 +33,7 @@ class CircuitTest < Minitest::Spec last_signal, (ctx, i, j, *bla) = circuit.([ctx, flow_options, 2], task: Start, runner: MyRunner) - expect(flow_options).must_equal(stack: [Start, A, B, End]) + assert_equal flow_options, { stack: [Start, A, B, End] } end MyRunner = ->(task, args, **circuit_options) do @@ -76,11 +76,11 @@ class CircuitTest < Minitest::Spec last_signal, (ctx, i, j, *bla) = outer.([ctx, {}, 2], task: Start) - expect(ctx.inspect).must_equal %{{:start=>1, :a=>2, :c=>6, :_end=>4, :b=>3}} - expect(last_signal).must_equal "the end" - expect(i).must_equal({}) - expect(j).must_equal 2 - expect(bla).must_equal [] + assert_equal ctx.inspect, %{{:start=>1, :a=>2, :c=>6, :_end=>4, :b=>3}} + assert_equal last_signal, "the end" + assert_equal i,({}) + assert_equal j, 2 + assert_equal bla, [] end it "allows using a custom :runner" do @@ -89,11 +89,11 @@ class CircuitTest < Minitest::Spec last_signal, (ctx, flow_options, j, *bla) = outer.([ctx, flow_options, 2], task: Start, runner: MyRunner) - expect(ctx.inspect).must_equal %{{:start=>1, :a=>2, :c=>6, :_end=>4, :b=>3}} - expect(last_signal).must_equal "the end" - expect(flow_options).must_equal(stack: [Start, A, nestable, Start, C, End, B, End], runner: MyRunner) - expect(j).must_equal 2 - expect(bla).must_equal [] + assert_equal ctx.inspect, %{{:start=>1, :a=>2, :c=>6, :_end=>4, :b=>3}} + assert_equal last_signal, "the end" + assert_equal flow_options, { stack: [Start, A, nestable, Start, C, End, B, End], runner: MyRunner } + assert_equal j, 2 + assert_equal bla, [] end let(:wicked_circuit) do diff --git a/test/intermediate_test.rb b/test/intermediate_test.rb index 8326a23..09dc327 100644 --- a/test/intermediate_test.rb +++ b/test/intermediate_test.rb @@ -164,7 +164,7 @@ def implementation(c_extensions) schema = Inter::Compiler.(intermediate, implementation([ext_a, ext_b, ext_d, ext_e])) - expect(schema[:config].to_h.inspect).must_equal %{{:wrap_static=>{}, :a=>\"bla\", :b=>\"blubb\", :C=>1, :e=>2}} + assert_equal schema[:config].to_h.inspect, %{{:wrap_static=>{}, :a=>\"bla\", :b=>\"blubb\", :C=>1, :e=>2}} end # {Implementation.call()} allows to pass {config} data @@ -172,13 +172,13 @@ def implementation(c_extensions) it "accepts {config_merge:} data that is merged into {config}" do schema = Inter::Compiler.(intermediate, implementation([]), config_merge: {beer: "yes"}) - expect(schema[:config].to_h.inspect).must_equal %{{:wrap_static=>{}, :beer=>\"yes\"}} + assert_equal schema[:config].to_h.inspect, %{{:wrap_static=>{}, :beer=>\"yes\"}} end it "{:config_merge} overrides values in {default_config}" do schema = Inter::Compiler.(intermediate, implementation([]), config_merge: {beer: "yes", wrap_static: "yo"}) - expect(schema[:config].to_h.inspect).must_equal %{{:wrap_static=>"yo", :beer=>\"yes\"}} + assert_equal schema[:config].to_h.inspect, %{{:wrap_static=>"yo", :beer=>\"yes\"}} end end end diff --git a/test/structures_test.rb b/test/structures_test.rb index 68d8153..c4d5cde 100644 --- a/test/structures_test.rb +++ b/test/structures_test.rb @@ -7,23 +7,23 @@ class StructuresTest < Minitest::Spec it "#call always returns the End instance itself" do signal, (_ctx, _flow_options) = evt.([{a: 1}, {}]) - expect(signal).must_equal evt + assert_equal signal, evt end it "responds to #to_h" do - expect(evt.to_h).must_equal({semantic: :meaning}) + assert_equal evt.to_h, {semantic: :meaning} end it "has strict object identity" do - expect(evt).wont_equal Activity::End(:meaning) + refute_equal evt, Activity::End(:meaning) end it "responds to #inspect" do - expect(evt.inspect).must_equal %{#} + assert_equal evt.inspect, %(#) end it "allows more variables" do - expect(Activity::End.new(semantic: :success, type: :event).to_h).must_equal(semantic: :success, type: :event) + assert_equal Activity::End.new(semantic: :success, type: :event).to_h, { semantic: :success, type: :event } end end end