From e5914564a8805544fd513e8c4d7f288da83ea940 Mon Sep 17 00:00:00 2001 From: Kyrylo Silin Date: Thu, 7 Mar 2019 23:12:47 +0200 Subject: [PATCH] spec/helper.rb -> spec/spec_helper.rb `helper.rb` is a legacy name from Bacon days. Since we use RSpec, the convention is to use `spec/spec_helper.rb`. Applying the principle of least astonishment here. --- .rspec | 2 +- spec/code_spec.rb | 4 ++-- spec/ring_spec.rb | 2 -- spec/{helper.rb => spec_helper.rb} | 0 4 files changed, 3 insertions(+), 5 deletions(-) rename spec/{helper.rb => spec_helper.rb} (100%) diff --git a/.rspec b/.rspec index 00b1a6b2..83e16f80 100644 --- a/.rspec +++ b/.rspec @@ -1,2 +1,2 @@ --color ---require helper +--require spec_helper diff --git a/spec/code_spec.rb b/spec/code_spec.rb index f7117a4b..a480e598 100644 --- a/spec/code_spec.rb +++ b/spec/code_spec.rb @@ -65,11 +65,11 @@ describe Pry::Code do end it 'finds files in a relative directory with `.rb` extension' do - expect(Pry::Code.from_file('../helper.rb').code_type).to eq :ruby + expect(Pry::Code.from_file('../spec_helper.rb').code_type).to eq :ruby end it 'finds files in a relative directory with `.rb` omitted' do - expect(Pry::Code.from_file('../helper').code_type).to eq :ruby + expect(Pry::Code.from_file('../spec_helper').code_type).to eq :ruby end it "doesn't confuse files with the same name, but without an extension" do diff --git a/spec/ring_spec.rb b/spec/ring_spec.rb index 437b4696..2f023461 100644 --- a/spec/ring_spec.rb +++ b/spec/ring_spec.rb @@ -1,5 +1,3 @@ -require_relative 'helper' - describe Pry::Ring do let(:ring) { described_class.new(3) } diff --git a/spec/helper.rb b/spec/spec_helper.rb similarity index 100% rename from spec/helper.rb rename to spec/spec_helper.rb