Ruby on Rails
Monday, October 16, 2017
Hi All,
note : first time joining any community. let me know if this kind of question is unappropriated here :)
newb question here,
If any of you guys have follow Agile Web Development with Rails 4,
That'd be super great! need help
on Chapter 7 Iteration B1: Validating!, (page 81) after you add validation to model
class Product < ActiveRecord::Base validates :title, :description, :image_url, presence: true validates :price, numericality: {greater_than_or_equal_to: 0.01} validates :title, uniqueness: true validates :image_url, allow_blank: true, format:{ with: %r{\.(gif|jpg|png)\Z}i, message: 'must be a URL for GIF, JPG, or PNG image.' } end
and do
rake test
I should get 2 test failures. instead, i got 0 test run
Finished tests in 0.001160s, 0.0000 tests/s, 0.0000 assertions/s. 0 tests, 0 assertions, 0 failures, 0 errors, 0 skips
did i miss something? seems like the test does not even executed.
Thanks before!
You received this message because you are subscribed to the Google Groups "Ruby on Rails: Talk" group.
To unsubscribe from this group and stop receiving emails from it, send an email to rubyonrails-talk+unsubscribe@googlegroups.com.
To post to this group, send email to rubyonrails-talk@googlegroups.com.
To view this discussion on the web visit https://groups.google.com/d/msgid/rubyonrails-talk/76706638-482d-4f85-9f34-b9d6072f3772%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.
Subscribe to:
Post Comments (Atom)
No comments:
Post a Comment