Created
June 29, 2011 19:23
-
-
Save ogredude/1054678 to your computer and use it in GitHub Desktop.
Autotest fails to recognize spec
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
class Department < ActiveRecord::Base | |
belongs_to :company | |
validates_presence_of :name, :department_number | |
end |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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 |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
[["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