summaryrefslogtreecommitdiff
path: root/spec/warning_spec.rb
blob: 18bfa219a05614180eba3c7da6cc77b9d31248b2 (plain)
1
2
3
4
5
6
7
8
RSpec.describe Pry::Warning do
  describe "#warn" do
    it "prints message with file and line of the calling frame" do
      expect(Kernel).to receive(:warn).with(/.+\.rb:\d+: warning: foo bar/)
      described_class.warn('foo bar')
    end
  end
end