Sha256: 51d7057b883b7b244471338874f4ad8e3637337397b9fb915172b99fdd1dbecd

Contents?: true

Size: 710 Bytes

Versions: 2

Compression:

Stored size: 710 Bytes

Contents

require 'complex'
require File.expand_path('../shared/sqrt', __FILE__)

describe "Math#sqrt" do
  it_behaves_like :complex_math_sqrt, :_, IncludesMath.new

  it "is a private instance method" do
    IncludesMath.should have_private_instance_method(:sqrt)
  end
end

ruby_version_is ""..."1.9" do
  describe "Math#sqrt!" do
    it_behaves_like :complex_math_sqrt_bang, :_, IncludesMath.new

    it "is a private instance method" do
      IncludesMath.should have_private_instance_method(:sqrt!)
    end
  end
end

describe "Math.sqrt" do
  it_behaves_like :complex_math_sqrt, :_, Math
end

ruby_version_is ""..."1.9" do
  describe "Math.sqrt!" do
    it_behaves_like :complex_math_sqrt_bang, :_, Math
  end
end

Version data entries

2 entries across 2 versions & 1 rubygems

Version Path
rubysl-complex-1.0.0 spec/math/sqrt_spec.rb
rubysl-complex-2.0.0 spec/math/sqrt_spec.rb