diff options
Diffstat (limited to 'spec/ruby/core/integer/gcdlcm_spec.rb')
| -rw-r--r-- | spec/ruby/core/integer/gcdlcm_spec.rb | 16 |
1 files changed, 8 insertions, 8 deletions
diff --git a/spec/ruby/core/integer/gcdlcm_spec.rb b/spec/ruby/core/integer/gcdlcm_spec.rb index ebf45e55a1..419bf9f275 100644 --- a/spec/ruby/core/integer/gcdlcm_spec.rb +++ b/spec/ruby/core/integer/gcdlcm_spec.rb @@ -7,8 +7,8 @@ describe "Integer#gcdlcm" do end it "returns an Array" do - 36.gcdlcm(6).should be_kind_of(Array) - 4.gcdlcm(20981).should be_kind_of(Array) + 36.gcdlcm(6).should.is_a?(Array) + 4.gcdlcm(20981).should.is_a?(Array) end it "returns a two-element Array" do @@ -28,26 +28,26 @@ describe "Integer#gcdlcm" do it "accepts a Bignum argument" do bignum = 91999**99 - bignum.should be_kind_of(Integer) + bignum.should.is_a?(Integer) 99.gcdlcm(bignum).should == [99.gcd(bignum), 99.lcm(bignum)] end it "works if self is a Bignum" do bignum = 9999**89 - bignum.should be_kind_of(Integer) + bignum.should.is_a?(Integer) bignum.gcdlcm(99).should == [bignum.gcd(99), bignum.lcm(99)] end it "raises an ArgumentError if not given an argument" do - -> { 12.gcdlcm }.should raise_error(ArgumentError) + -> { 12.gcdlcm }.should.raise(ArgumentError) end it "raises an ArgumentError if given more than one argument" do - -> { 12.gcdlcm(30, 20) }.should raise_error(ArgumentError) + -> { 12.gcdlcm(30, 20) }.should.raise(ArgumentError) end it "raises a TypeError unless the argument is an Integer" do - -> { 39.gcdlcm(3.8) }.should raise_error(TypeError) - -> { 45872.gcdlcm([]) }.should raise_error(TypeError) + -> { 39.gcdlcm(3.8) }.should.raise(TypeError) + -> { 45872.gcdlcm([]) }.should.raise(TypeError) end end |
