testing doc.

This commit is contained in:
yanxd 2014-07-23 09:31:58 +08:00
parent 0a06e2033f
commit 9be52f6cf7
3 changed files with 2 additions and 2 deletions

View File

@ -6,6 +6,7 @@
# end # end
# #
guard 'spork', :test_unit => true, :test_unit_env => {'RAILS_ENV' => 'test'}, :wait => 60 do guard 'spork', :test_unit => true, :test_unit_env => {'RAILS_ENV' => 'test'}, :wait => 60 do
watch(%r{app/models/.+\.rb})
watch('config/application.rb') watch('config/application.rb')
watch('config/environment.rb') watch('config/environment.rb')
watch('config/environments/test.rb') watch('config/environments/test.rb')

View File

@ -15,7 +15,6 @@ class CourseTest < ActiveSupport::TestCase
error_keys = course.errors.keys error_keys = course.errors.keys
valid_attr = [:password, :term, :name, :class_period] valid_attr = [:password, :term, :name, :class_period]
puts error_keys
valid_attr.each do |attr| valid_attr.each do |attr|
assert(error_keys.include?(attr), "attr unknow: #{attr}") assert(error_keys.include?(attr), "attr unknow: #{attr}")
end end
@ -43,7 +42,7 @@ class CourseTest < ActiveSupport::TestCase
course.name = "test_course" course.name = "test_course"
assert course.valid? assert course.valid?
course.name = name_quirk course.name = name_quirk
assert course.valid? assert course.valid?, "Quirk name ===> #{course.name}"
end end
test 'description too long must be valid.(4096)' do test 'description too long must be valid.(4096)' do