title: I'm getting started with testing in Rails, and I'm unsure of my tests
body: <p>I've been trying to become a proper TDD dude. I've set up Rspec, FactoryGirl, and some basic tests on my model. All of these tests are validating for presence on my Plantask model. </p>
  
  <p>I've moved my Factory to a before block, which was some minor refactoring, but since I'm new to testing, I'd like some advice on how to improve my tests. I'm not experienced enough yet to know if they are even really "DRY".  </p>
  
  <p><strong>In my model:</strong></p>
  
  <p>validates :area_id, presence: true # Add so on.</p>
  
  <p><strong>My tests:</strong></p>
  
  <pre><code>require 'spec_helper'
  
  describe Plantask do
      before(:each) do
          @plantask = FactoryGirl.create(:plantask)
      end
  
      it "is valid with valid attributes" do
          @plantask.should be_valid
      end
  
      it "is invalid without an area" do
          @plantask.area_id = nil
          @plantask.should_not be_valid
      end
  
      it "is invalid without equipment" do
          @plantask.equipment_id = nil
          @plantask.should_not be_valid
      end
  
      it "is invalid without a part" do
          @plantask.part_id = nil
          @plantask.should_not be_valid
      end
  
      it "is invalid without a description" do
          @plantask.description = nil
          @plantask.should_not be_valid
      end
  
      it "is invalid without a datatype" do
          @plantask.datatype_id = nil
          @plantask.should_not be_valid
      end
  
      it "is invalid without an assignment" do
          @plantask.assigned = nil
          @plantask.should_not be_valid
      end
  
      it "is invalid without an associate" do
          @plantask.associate_id = nil
          @plantask.should_not be_valid
      end
  
      it "is invalid without a number" do
          @plantask.number = nil
          @plantask.should_not be_valid
      end
  
  end
  </code></pre>
  
  <p>Alright, thanks you guys. Now I have this, which is much more compact. Way cool. </p>
  
  <pre><code>require 'spec_helper'
  
  describe Plantask do
  
  subject (:plantask) { FactoryGirl.create(:plantask) }
  
    it { should validate_presence_of(:area_id) }
    it { should validate_presence_of(:equipment_id) }
    it { should validate_presence_of(:part_id) }
    it { should validate_presence_of(:description) }
    it { should validate_presence_of(:datatype_id) }
    it { should validate_presence_of(:assigned) }
    it { should validate_presence_of(:associate_id) }
    it { should validate_presence_of(:procedure_id) }
    it { should validate_presence_of(:recurrence) }
    it { should validate_presence_of(:number) }
  
    it { should be_valid }
  end
  </code></pre>