Skip to content

Commit

Permalink
Update documentation to use matcher syntax instead of macros
Browse files Browse the repository at this point in the history
  • Loading branch information
joshuaclayton committed Jun 22, 2010
1 parent 2e0a2e0 commit a559fc8
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 5 deletions.
6 changes: 3 additions & 3 deletions lib/shoulda/active_record/matchers/association_matcher.rb
Expand Up @@ -20,9 +20,9 @@ def belong_to(name)
# dependent option.
#
# Example:
# it { should_have_many(:friends) }
# it { should_have_many(:enemies).through(:friends) }
# it { should_have_many(:enemies).dependent(:destroy) }
# it { should have_many(:friends) }
# it { should have_many(:enemies).through(:friends) }
# it { should have_many(:enemies).dependent(:destroy) }
#
def have_many(name)
AssociationMatcher.new(:has_many, name)
Expand Down
4 changes: 2 additions & 2 deletions lib/shoulda/context.rb
Expand Up @@ -116,7 +116,7 @@ def should_not(matcher)
# context "on GET" do
# setup { get :index }
#
# should_respond_with :success
# should respond_with(:success)
#
# # runs before "get :index"
# before_should "find all users" do
Expand Down Expand Up @@ -215,7 +215,7 @@ def described_type
# subject { User.first }
#
# # uses the existing user
# should_validate_uniqueness_of :email
# should validate_uniqueness_of(:email)
# end
def subject(&block)
@subject_block = block
Expand Down

0 comments on commit a559fc8

Please sign in to comment.