aboutsummaryrefslogtreecommitdiffstats
path: root/spec/ruby/shared/complex/numeric/conj.rb
diff options
context:
space:
mode:
Diffstat (limited to 'spec/ruby/shared/complex/numeric/conj.rb')
-rw-r--r--spec/ruby/shared/complex/numeric/conj.rb20
1 files changed, 20 insertions, 0 deletions
diff --git a/spec/ruby/shared/complex/numeric/conj.rb b/spec/ruby/shared/complex/numeric/conj.rb
new file mode 100644
index 0000000000..50cb060442
--- /dev/null
+++ b/spec/ruby/shared/complex/numeric/conj.rb
@@ -0,0 +1,20 @@
+require File.expand_path('../../../../spec_helper', __FILE__)
+
+describe :numeric_conj, shared: true do
+ before :each do
+ @numbers = [
+ 20, # Integer
+ 398.72, # Float
+ Rational(3, 4), # Rational
+ bignum_value,
+ infinity_value,
+ nan_value
+ ]
+ end
+
+ it "returns self" do
+ @numbers.each do |number|
+ number.send(@method).should equal(number)
+ end
+ end
+end