forked from robwilliams/active_press
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
taxonomies now have post associations
- Loading branch information
1 parent
03e86bc
commit f48e71a
Showing
7 changed files
with
27 additions
and
16 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,6 +1,5 @@ | ||
require 'spec_helper' | ||
|
||
describe ActivePress::Category do | ||
it { should belong_to(:term) } | ||
it { should have_many(:term_relationships) } | ||
it_should_behave_like "a Taxonomy" | ||
end |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,6 +1,5 @@ | ||
require 'spec_helper' | ||
|
||
describe ActivePress::Tag do | ||
it { should belong_to(:term) } | ||
it { should have_many(:term_relationships) } | ||
it_should_behave_like "a Taxonomy" | ||
end |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,5 @@ | ||
shared_examples_for "a Taxonomy" do | ||
it { should belong_to(:term) } | ||
it { should have_many(:term_relationships) } | ||
it { should have_many(:posts).through(:term_relationships) } | ||
end |