我尝试从“使用Rails 4进行敏捷Web开发”创建网上商店。当我写 '耙测试',我得到这个消息:RubyOnRails Rake测试失败
$ rake test
Run options: --seed 54737
# Running:
........F...F
Finished in 0.279167s, 46.5671 runs/s, 118.2088 assertions/s.
1) Failure:
ProductTest#test__product_is_not_valid_without_a_unique_title_-_i18n [/Users/roni/Coding/Ruby/depot/test/models/product_test.rb:82]:
--- expected
+++ actual
@@ -1 +1 @@
-["translation missing: en.activerecord.errors.messages.taken"]
+["has already been taken"]
2) Failure:
ProductTest#test_product_price_must_be_positive [/Users/roni/Coding/Ruby/depot/test/models/product_test.rb:25]:
Failed assertion, no message given.
13 runs, 33 assertions, 2 failures, 0 errors, 0 skips
这是product_test.rb
请帮助我,我做错了什么?
非常感谢,'errors.messages.taken'是我的解决方案! – hernanvicente 2015-02-27 01:24:44