watcher_spec.rb 283 Bytes Edit Raw Blame History 1 2 3 4 5 6 7 8 9 10 11 12 13 require 'spec_helper' describe Watcher do context 'validations' do it 'requires an email address' do watcher = Factory.build(:watcher, :email => nil) watcher.should_not be_valid watcher.errors[:email].should include("can't be blank") end end end