Skip to content

Instantly share code, notes, and snippets.

Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save ogredude/1054678 to your computer and use it in GitHub Desktop.
Save ogredude/1054678 to your computer and use it in GitHub Desktop.
Autotest fails to recognize spec
class Department < ActiveRecord::Base
belongs_to :company
validates_presence_of :name, :department_number
end
require 'spec_helper'
describe Department do
it {should belong_to(:company)}
[:name, :department_number].each do |attr|
it "must have a(n) #{attr}" do
d = Factory.build(:department, attr.to_s => nil)
d.should_not be_valid
d.errors[attr].should_not be_empty
end
end
end
[["app/models/department.rb", Wed Jun 29 13:10:07 -0600 2011]]
No tests matched app/models/dealership.rb
[["app/models/department.rb", Wed Jun 29 13:10:07 -0600 2011]]
No tests matched app/models/department.rb
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment