Sha256: 04d955365749d5b7d94b73849069acbd75affcd2c7fac798dcea6b7accf3fc2e

Contents?: true

Size: 453 Bytes

Versions: 5

Compression:

Stored size: 453 Bytes

Contents

require 'spec_helper'
require 'bigdecimal'
require 'jruby_coercion/numeric'

describe Java::JavaMath::BigDecimal do 
  context "Numeric" do
    [
      [3, 3],
      [Integer(3), 3],
      [-100, -100],
      [0, 0]
    ].each do |test_numeric, constructor_arg|
      specify { test_numeric.to_java(described_class).should eq(described_class.new(constructor_arg)) }
      specify { test_numeric.should be_coerced_to(described_class) }
    end
  end
end

Version data entries

5 entries across 5 versions & 1 rubygems

Version Path
jruby_coercion-0.0.7-java spec/coercions/big_decimal_spec.rb
jruby_coercion-0.0.6-java spec/coercions/big_decimal_spec.rb
jruby_coercion-0.0.5-java spec/coercions/big_decimal_spec.rb
jruby_coercion-0.0.4-java spec/coercions/big_decimal_spec.rb
jruby_coercion-0.0.3-java spec/coercions/big_decimal_spec.rb