Skip to content
Browse files

documentation and fixes to :through test

git-svn-id: https://svn.thoughtbot.com/plugins/shoulda/trunk@163 7bbfaf0e-4d1d-0410-9690-a8bb5f8ef2aa
  • Loading branch information...
1 parent 037e9c8 commit e9eba101051dd81874b07a2f59456881fc72cc49 tsaleh committed Aug 7, 2007
Showing with 7 additions and 3 deletions.
  1. +1 −1 README
  2. +1 −1 Rakefile
  3. +5 −1 lib/shoulda/active_record_helpers.rb
View
2 README
@@ -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
2 Rakefile
@@ -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
6 lib/shoulda/active_record_helpers.rb
@@ -276,7 +276,11 @@ def should_have_many(*associations)
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

0 comments on commit e9eba10

Please sign in to comment.
Something went wrong with that request. Please try again.