diff --git a/README b/README index 3632e5cb..93364ea8 100644 --- a/README +++ b/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. diff --git a/Rakefile b/Rakefile index c2fbd5e1..fa6aaaeb 100644 --- a/Rakefile +++ b/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') diff --git a/lib/shoulda/active_record_helpers.rb b/lib/shoulda/active_record_helpers.rb index 19db310c..8334f19b 100644 --- a/lib/shoulda/active_record_helpers.rb +++ b/lib/shoulda/active_record_helpers.rb @@ -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