diff options
Diffstat (limited to 'spec/ruby/language/heredoc_spec.rb')
-rw-r--r-- | spec/ruby/language/heredoc_spec.rb | 14 |
1 files changed, 7 insertions, 7 deletions
diff --git a/spec/ruby/language/heredoc_spec.rb b/spec/ruby/language/heredoc_spec.rb index a57a7b0bb9..1cc836063d 100644 --- a/spec/ruby/language/heredoc_spec.rb +++ b/spec/ruby/language/heredoc_spec.rb @@ -1,6 +1,6 @@ # -*- encoding: us-ascii -*- -require File.expand_path('../../spec_helper', __FILE__) +require_relative '../spec_helper' describe "Heredoc string" do @@ -55,32 +55,32 @@ HERE ruby_version_is "2.3" do it "allows HEREDOC with <<~'identifier', allowing to indent identifier and content" do - require File.expand_path('../fixtures/squiggly_heredoc', __FILE__) + require_relative 'fixtures/squiggly_heredoc' SquigglyHeredocSpecs.message.should == "character density, n.:\n The number of very weird people in the office.\n" end it "trims trailing newline character for blank HEREDOC with <<~'identifier'" do - require File.expand_path('../fixtures/squiggly_heredoc', __FILE__) + require_relative 'fixtures/squiggly_heredoc' SquigglyHeredocSpecs.blank.should == "" end it 'allows HEREDOC with <<~identifier, interpolated' do - require File.expand_path('../fixtures/squiggly_heredoc', __FILE__) + require_relative 'fixtures/squiggly_heredoc' SquigglyHeredocSpecs.unquoted.should == "unquoted interpolated\n" end it 'allows HEREDOC with <<~"identifier", interpolated' do - require File.expand_path('../fixtures/squiggly_heredoc', __FILE__) + require_relative 'fixtures/squiggly_heredoc' SquigglyHeredocSpecs.doublequoted.should == "doublequoted interpolated\n" end it "allows HEREDOC with <<~'identifier', no interpolation" do - require File.expand_path('../fixtures/squiggly_heredoc', __FILE__) + require_relative 'fixtures/squiggly_heredoc' SquigglyHeredocSpecs.singlequoted.should == "singlequoted \#{\"interpolated\"}\n" end it "selects the least-indented line and removes its indentation from all the lines" do - require File.expand_path('../fixtures/squiggly_heredoc', __FILE__) + require_relative 'fixtures/squiggly_heredoc' SquigglyHeredocSpecs.least_indented_on_the_last_line.should == " a\n b\nc\n" end end |