Skip to content

Commit

Permalink
updated to only stub method requirements with it_should_find_and_x he…
Browse files Browse the repository at this point in the history
…lpers
  • Loading branch information
Russell Norris committed Jan 21, 2009
1 parent a715717 commit c6c7f11
Showing 1 changed file with 4 additions and 4 deletions.
8 changes: 4 additions & 4 deletions lib/lucky_sneaks/controller_spec_helpers.rb
Original file line number Diff line number Diff line change
Expand Up @@ -43,7 +43,7 @@ def create_ar_class_expectation(name, method, argument = nil, options = {})
args = []
unless options.delete(:only_method)
args << argument unless argument.nil?
args << hash_including(options) unless options.blank?
args << hash_including(options) unless options.empty?
end
method = options.delete(:find_method) if options[:find_method]
if args.empty?
Expand Down Expand Up @@ -260,7 +260,7 @@ def it_should_not_assign(*names)
# isn't the right helper method and you should write out the two expectations separately.
def it_should_find_and_assign(*names)
names.each do |name|
it_should_find name
it_should_find name, :only_method => true
it_should_assign name
end
end
Expand Down Expand Up @@ -323,7 +323,7 @@ def it_should_initialize_and_save(*names)
# instance is found but not saved, just use <tt>it_should_find_and_assign</tt>.
def it_should_find_and_update(*names)
names.each do |name|
it_should_find name
it_should_find name, :only_method => true
it_should_update name
end
end
Expand All @@ -333,7 +333,7 @@ def it_should_find_and_update(*names)
# isn't the right helper method and you should write out the two expectations separately.
def it_should_find_and_destroy(*names)
names.each do |name|
it_should_find name
it_should_find name, :only_method => true
it_should_destroy name
end
end
Expand Down

0 comments on commit c6c7f11

Please sign in to comment.