Thanks!

On Tuesday, April 22, 2014 1:12 AM, Bryan Yap <notifications@github.com> wrote:
 
In spec/models/comment_spec.rb:
> @@ -0,0 +1,20 @@
> +require 'spec_helper'
> +
> +#RSpec Unit test on Post Comment model
> +
> +
> +describe Comment do
> +  describe 'validation' do
> +    subject(:comment) {Comment.new}
> +    before {comment.valid? }
> +
> +
> +    [:post, :name, :body].each do |attribute|
> +      it "should validate presence of #{attribute}" do 
I like the way this test was done! To be honest I haven't done it this way, but it is really clean! Good job!
—
Reply to this email directly or view it on GitHub.