Answer the question
In order to leave comments, you need to log in
What does a line of code mean?
What does a line of code from the RoR book mean?
If so, then the test passes without error:
assert_equal ["must be greater than or equal to 0.01"]
assert_equal ["must be greater than or equal too 0.01"]
[email protected] ~/Dev/depot $ rake test
Run options: --seed 2627
# Running:
..........F.........
Finished in 0.556599s, 35.9325 runs/s, 88.0347 assertions/s.
1) Failure:
ProductTest#test_Цена_продукта_должна_быть_правильной [/home/beerdy/Dev/depot/test/models/product_test.rb:25]:
--- expected
+++ actual
@@ -1 +1 @@
-["must be greater than or equal too 0.01"]
+["must be greater than or equal to 0.01"]
20 runs, 49 assertions, 1 failures, 0 errors, 0 skips
Answer the question
In order to leave comments, you need to log in
assert_equal ["must be greater than or equal to 0.01"]
checks that an error is displayed that says must be greater than or equal to 0.01
I understand that this validation, in case of an error, raises an exception in the form of a string:
And this assert_equal method, as I understand it, just compares two strings? It turns out that it is simply used for aesthetic design in tests (or whatever it is called)?
Didn't find what you were looking for?
Ask your questionAsk a Question
731 491 924 answers to any question