Skip to content

Commit

Permalink
Fixed specs for assoc rename
Browse files Browse the repository at this point in the history
  • Loading branch information
ianwhite committed Apr 28, 2008
1 parent f471f70 commit 55d5c34
Show file tree
Hide file tree
Showing 2 changed files with 16 additions and 14 deletions.
14 changes: 8 additions & 6 deletions README.rdoc
Original file line number Diff line number Diff line change
@@ -1,22 +1,24 @@
= nested_has_many_through

This fantastic patch/plugin has been floating around for a while:
A fantastic patch/plugin has been floating around for a while:

* http://dev.rubyonrails.org/ticket/6461
* http://code.torchbox.com/svn/rails/plugins/nested_has_many_through

I didn't write it, but I'm packaging/refactoring it up in a plugin, and writing
a bunch of acceptance specs for it.
Matt Westcott released the first version, under the MIT license.

Matt Westcott released the first version, under the MIT license
Here is a refactored version (I didn't write the original), suitable for edge/2.0-stable
with a bunch of acceptance specs. I'm concentrating on plugin usage, once
it becomes stable, and well enough speced/understood, then it's time to pester
rails-core.

== Why republish this on github?

* The current implementations are very poorly speced/tested, so it's pretty
hard to refactor and undertand this complicated bit of sql-fu, especially
hard to refactor and understand this complicated bit of sql-fu, especially
when you're aiming at a moving target (edge)
* the lastest patches don't apply on edge
* github mania - let's collab to make this better and get a patch accepted, fork away!1
* github - let's collab to make this better and get a patch accepted, fork away!

== History

Expand Down
16 changes: 8 additions & 8 deletions spec/models/author_spec.rb
Original file line number Diff line number Diff line change
Expand Up @@ -17,12 +17,12 @@
@author.categories.should == []
end

it "#recommended_posts should == []" do
@author.recommended_posts.should == []
it "#similar_posts should == []" do
@author.similar_posts.should == []
end

it "#recommended_authors should == []" do
@author.recommended_authors.should == []
it "#similar_authors should == []" do
@author.similar_authors.should == []
end

it "#commenters should == []" do
Expand Down Expand Up @@ -58,12 +58,12 @@
@author.categories.should == [@category]
end

it "#recommended_posts.should == [@post, @other_post]" do
@author.recommended_posts.should == [@post, @other_post]
it "#similar_posts.should == [@post, @other_post]" do
@author.similar_posts.should == [@post, @other_post]
end

it "#recommended_authors.should == [@author, @other_author]" do
@author.recommended_authors.should == [@author, @other_author]
it "#similar_authors.should == [@author, @other_author]" do
@author.similar_authors.should == [@author, @other_author]
end
end
end
Expand Down

0 comments on commit 55d5c34

Please sign in to comment.