diff --git a/spec/code_spec.rb b/spec/code_spec.rb index 3f06e808..51b626f6 100644 --- a/spec/code_spec.rb +++ b/spec/code_spec.rb @@ -71,6 +71,14 @@ describe Pry::Code do it 'finds files in a relative directory with `.rb` omitted' do Pry::Code.from_file('../helper').code_type.should == :ruby end + + it "doesn't confuse files with the same name, but without an extension" do + Pry::Code.from_file('cat_load_path').code_type.should == :unknown + end + + it "doesn't confuse files with the same name, but with an extension" do + Pry::Code.from_file('cat_load_path.rb').code_type.should == :ruby + end end end diff --git a/spec/fixtures/cat_load_path b/spec/fixtures/cat_load_path new file mode 100644 index 00000000..e69de29b diff --git a/spec/fixtures/cat_load_path.rb b/spec/fixtures/cat_load_path.rb new file mode 100644 index 00000000..e69de29b