summaryrefslogtreecommitdiff
path: root/spec/ruby/library/mathn/math
diff options
context:
space:
mode:
Diffstat (limited to 'spec/ruby/library/mathn/math')
-rw-r--r--spec/ruby/library/mathn/math/rsqrt_spec.rb4
-rw-r--r--spec/ruby/library/mathn/math/shared/rsqrt.rb2
-rw-r--r--spec/ruby/library/mathn/math/shared/sqrt.rb2
-rw-r--r--spec/ruby/library/mathn/math/sqrt_spec.rb4
4 files changed, 6 insertions, 6 deletions
diff --git a/spec/ruby/library/mathn/math/rsqrt_spec.rb b/spec/ruby/library/mathn/math/rsqrt_spec.rb
index a49efa6ff9..6cb7595afe 100644
--- a/spec/ruby/library/mathn/math/rsqrt_spec.rb
+++ b/spec/ruby/library/mathn/math/rsqrt_spec.rb
@@ -1,7 +1,7 @@
-require File.expand_path('../../../../spec_helper', __FILE__)
+require_relative '../../../spec_helper'
ruby_version_is ''...'2.5' do
- require File.expand_path('../shared/rsqrt', __FILE__)
+ require_relative 'shared/rsqrt'
describe "Math#rsqrt" do
it_behaves_like :mathn_math_rsqrt, :_, IncludesMath.new
diff --git a/spec/ruby/library/mathn/math/shared/rsqrt.rb b/spec/ruby/library/mathn/math/shared/rsqrt.rb
index 68e2f7d02f..0f623a7d4f 100644
--- a/spec/ruby/library/mathn/math/shared/rsqrt.rb
+++ b/spec/ruby/library/mathn/math/shared/rsqrt.rb
@@ -1,5 +1,5 @@
require 'mathn'
-require File.expand_path('../../fixtures/classes', __FILE__)
+require_relative '../fixtures/classes'
describe :mathn_math_rsqrt, shared: true do
it "returns the square root for Rational numbers" do
diff --git a/spec/ruby/library/mathn/math/shared/sqrt.rb b/spec/ruby/library/mathn/math/shared/sqrt.rb
index 6aab25fc5d..5e6dae1d4f 100644
--- a/spec/ruby/library/mathn/math/shared/sqrt.rb
+++ b/spec/ruby/library/mathn/math/shared/sqrt.rb
@@ -1,5 +1,5 @@
require 'mathn'
-require File.expand_path('../../fixtures/classes', __FILE__)
+require_relative '../fixtures/classes'
describe :mathn_math_sqrt, shared: true do
it "returns the square root for Rational numbers" do
diff --git a/spec/ruby/library/mathn/math/sqrt_spec.rb b/spec/ruby/library/mathn/math/sqrt_spec.rb
index b723360891..49cfe3600e 100644
--- a/spec/ruby/library/mathn/math/sqrt_spec.rb
+++ b/spec/ruby/library/mathn/math/sqrt_spec.rb
@@ -1,7 +1,7 @@
-require File.expand_path('../../../../spec_helper', __FILE__)
+require_relative '../../../spec_helper'
ruby_version_is ''...'2.5' do
- require File.expand_path('../shared/sqrt', __FILE__)
+ require_relative 'shared/sqrt'
describe "Math#rsqrt" do
it_behaves_like :mathn_math_sqrt, :_, IncludesMath.new