diff options
author | GitLab Bot <gitlab-bot@gitlab.com> | 2022-01-20 12:16:11 +0300 |
---|---|---|
committer | GitLab Bot <gitlab-bot@gitlab.com> | 2022-01-20 12:16:11 +0300 |
commit | edaa33dee2ff2f7ea3fac488d41558eb5f86d68c (patch) | |
tree | 11f143effbfeba52329fb7afbd05e6e2a3790241 /spec/lib/gitlab/sherlock/location_spec.rb | |
parent | d8a5691316400a0f7ec4f83832698f1988eb27c1 (diff) |
Add latest changes from gitlab-org/gitlab@14-7-stable-eev14.7.0-rc42
Diffstat (limited to 'spec/lib/gitlab/sherlock/location_spec.rb')
-rw-r--r-- | spec/lib/gitlab/sherlock/location_spec.rb | 42 |
1 files changed, 0 insertions, 42 deletions
diff --git a/spec/lib/gitlab/sherlock/location_spec.rb b/spec/lib/gitlab/sherlock/location_spec.rb deleted file mode 100644 index 4a8b5dffba2..00000000000 --- a/spec/lib/gitlab/sherlock/location_spec.rb +++ /dev/null @@ -1,42 +0,0 @@ -# frozen_string_literal: true - -require 'spec_helper' - -RSpec.describe Gitlab::Sherlock::Location do - let(:location) { described_class.new(__FILE__, 1) } - - describe 'from_ruby_location' do - it 'creates a Location from a Thread::Backtrace::Location' do - input = caller_locations[0] - output = described_class.from_ruby_location(input) - - expect(output).to be_an_instance_of(described_class) - expect(output.path).to eq(input.path) - expect(output.line).to eq(input.lineno) - end - end - - describe '#path' do - it 'returns the file path' do - expect(location.path).to eq(__FILE__) - end - end - - describe '#line' do - it 'returns the line number' do - expect(location.line).to eq(1) - end - end - - describe '#application?' do - it 'returns true for an application frame' do - expect(location.application?).to eq(true) - end - - it 'returns false for a non application frame' do - loc = described_class.new('/tmp/cats.rb', 1) - - expect(loc.application?).to eq(false) - end - end -end |