test/virtual_test.rb in reform-2.3.3 vs test/virtual_test.rb in reform-2.5.0
- 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.
+ assert_equal form.credit_card_number, "123" # this is still readable in the UI.
+ assert_equal form.transactions.first.id, 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])
+ assert_equal hash, "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])
+ assert_equal hash(form), "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.
+ assert_equal form.credit_card_number, "123" # this is still readable in the UI.
+ assert_equal form.transactions.first.id, 1 # this is still readable in the UI.
form.sync
- _(hash(form)).must_equal("credit_card_number" => "123", "transactions" => ["id" => 1])
+ assert_equal hash(form), "credit_card_number" => "123", "transactions" => ["id" => 1]
}
end