summaryrefslogtreecommitdiff
path: root/spec/ruby/core/integer/lcm_spec.rb
diff options
context:
space:
mode:
Diffstat (limited to 'spec/ruby/core/integer/lcm_spec.rb')
-rw-r--r--spec/ruby/core/integer/lcm_spec.rb20
1 files changed, 10 insertions, 10 deletions
diff --git a/spec/ruby/core/integer/lcm_spec.rb b/spec/ruby/core/integer/lcm_spec.rb
index 39976ea474..6659247d1e 100644
--- a/spec/ruby/core/integer/lcm_spec.rb
+++ b/spec/ruby/core/integer/lcm_spec.rb
@@ -7,8 +7,8 @@ describe "Integer#lcm" do
end
it "returns an Integer" do
- 36.lcm(6).should be_kind_of(Integer)
- 4.lcm(20981).should be_kind_of(Integer)
+ 36.lcm(6).should.is_a?(Integer)
+ 4.lcm(20981).should.is_a?(Integer)
end
it "returns the least common multiple of self and argument" do
@@ -31,28 +31,28 @@ describe "Integer#lcm" do
-100.lcm(-100).should == 100
end
- it "accepts an Integer argument" do
+ it "accepts a Bignum argument" do
bignum = 9999**99
- bignum.should be_kind_of(Integer)
+ bignum.should.is_a?(Integer)
99.lcm(bignum).should == bignum
end
- it "works if self is an Integer" do
+ it "works if self is a Bignum" do
bignum = 9999**99
- bignum.should be_kind_of(Integer)
+ bignum.should.is_a?(Integer)
bignum.lcm(99).should == bignum
end
it "raises an ArgumentError if not given an argument" do
- -> { 12.lcm }.should raise_error(ArgumentError)
+ -> { 12.lcm }.should.raise(ArgumentError)
end
it "raises an ArgumentError if given more than one argument" do
- -> { 12.lcm(30, 20) }.should raise_error(ArgumentError)
+ -> { 12.lcm(30, 20) }.should.raise(ArgumentError)
end
it "raises a TypeError unless the argument is an Integer" do
- -> { 39.lcm(3.8) }.should raise_error(TypeError)
- -> { 45872.lcm([]) }.should raise_error(TypeError)
+ -> { 39.lcm(3.8) }.should.raise(TypeError)
+ -> { 45872.lcm([]) }.should.raise(TypeError)
end
end