Skip to content

Commit

Permalink
Deprecate using with without arguments.
Browse files Browse the repository at this point in the history
  • Loading branch information
yousuketto committed Jun 10, 2015
1 parent f9e2487 commit 6fc9ac7
Showing 1 changed file with 2 additions and 0 deletions.
2 changes: 2 additions & 0 deletions lib/rspec/mocks/message_expectation.rb
Original file line number Diff line number Diff line change
Expand Up @@ -358,6 +358,8 @@ def with(*args, &block)
else
self.inner_implementation_action = block
end
elsif args.empty?
RSpec.deprecate "Using `with` without arguments", :replacement => "`with(no_args)`"
end

@argument_list_matcher = ArgumentListMatcher.new(*args, &block)
Expand Down

0 comments on commit 6fc9ac7

Please sign in to comment.