test/virtual_test.rb in reform-2.3.2 vs test/virtual_test.rb in reform-2.3.3

- old
+ new

@@ -11,21 +11,21 @@ let(:form) { CreditCardForm.new(Object.new) } it { form.validate(credit_card_number: "123", transactions: [id: 1]) - form.credit_card_number.must_equal "123" # this is still readable in the UI. - form.transactions.first.id.must_equal 1 # this is still readable in the UI. + _(form.credit_card_number).must_equal "123" # this is still readable in the UI. + _(form.transactions.first.id).must_equal 1 # this is still readable in the UI. form.sync hash = {} form.save do |nested| hash = nested end - hash.must_equal("credit_card_number" => "123", "transactions" => ["id" => 1]) + _(hash).must_equal("credit_card_number" => "123", "transactions" => ["id" => 1]) } end class VirtualAndDefaultTest < MiniTest::Spec class CreditCardForm < TestForm @@ -47,18 +47,18 @@ it { form = CreditCardForm.new(Object.new) form.validate({}) - hash(form).must_equal("credit_card_number" => "123", "transactions" => ["id" => 2]) + _(hash(form)).must_equal("credit_card_number" => "123", "transactions" => ["id" => 2]) form = CreditCardForm.new(Object.new) form.validate(credit_card_number: "123", transactions: [id: 1]) - form.credit_card_number.must_equal "123" # this is still readable in the UI. - form.transactions.first.id.must_equal 1 # this is still readable in the UI. + _(form.credit_card_number).must_equal "123" # this is still readable in the UI. + _(form.transactions.first.id).must_equal 1 # this is still readable in the UI. form.sync - hash(form).must_equal("credit_card_number" => "123", "transactions" => ["id" => 1]) + _(hash(form)).must_equal("credit_card_number" => "123", "transactions" => ["id" => 1]) } end