Skip to content

Commit

Permalink
Merge pull request #195 from rspec/add_expect_no_warning
Browse files Browse the repository at this point in the history
Add expectation for no warnings
  • Loading branch information
JonRowe committed Apr 15, 2015
2 parents a844bd9 + 529d927 commit ddcb269
Showing 1 changed file with 4 additions and 0 deletions.
4 changes: 4 additions & 0 deletions lib/rspec/support/spec/deprecation_helpers.rb
Expand Up @@ -54,6 +54,10 @@ def expect_warning_with_call_site(file, line, expected=//)
end
end

def expect_no_warnings
expect(::Kernel).not_to receive(:warn)
end

def allow_warning
allow(::Kernel).to receive(:warn)
end
Expand Down

0 comments on commit ddcb269

Please sign in to comment.