documentation and fixes to :through test

git-svn-id: https://svn.thoughtbot.com/plugins/shoulda/trunk@163 7bbfaf0e-4d1d-0410-9690-a8bb5f8ef2aa
This commit is contained in:
tsaleh 2007-08-07 14:44:59 +00:00
parent 037e9c817e
commit e9eba10105
3 changed files with 7 additions and 3 deletions

2
README
View File

@ -1,4 +1,4 @@
= Shoulda
= Shoulda - Making tests easy on the fingers and eyes
Shoulda makes it easy to write elegant, understandable, and maintainable tests. Shoulda consists of test macros, assertions, and helpers added on to the Test::Unit framework. It's fully compatible with your existing tests, and requires no retooling to use.

View File

@ -14,7 +14,7 @@ end
Rake::RDocTask.new { |rdoc|
rdoc.rdoc_dir = 'doc'
rdoc.title = "Shoulda -- Making your tests easy on the fingers and eyes"
rdoc.title = "Shoulda -- Making tests easy on the fingers and eyes"
rdoc.options << '--line-numbers' << '--inline-source'
rdoc.template = "#{ENV['template']}.rb" if ENV['template']
rdoc.rdoc_files.include('README', 'lib/**/*.rb')

View File

@ -276,7 +276,11 @@ module ThoughtBot # :nodoc:
reflection = klass.reflect_on_association(association)
assert reflection
assert_equal :has_many, reflection.macro
assert_equal(through, reflection.options[:through]) if through
if through
through_reflection = klass.reflect_on_association(through)
assert through_reflection
assert_equal(through, reflection.options[:through])
end
end
end
end