Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with HTTPS or Subversion.

Download ZIP
Browse files

Use 'obj.should equal(other_obj)' instead of 'obj.equal?(other_obj).s…

…hould == true'.
  • Loading branch information...
commit 5a1271e11fab94a7b38f68411a5679a9ee89c15f 1 parent db5243a
@arthurschreiber arthurschreiber authored
Showing with 82 additions and 82 deletions.
  1. +1 −1  1.8/core/array/reject_spec.rb
  2. +1 −1  1.8/core/array/reverse_spec.rb
  3. +1 −1  1.8/core/array/shared/collect.rb
  4. +1 −1  1.8/core/array/to_a_spec.rb
  5. +2 −2 1.8/core/array/to_ary_spec.rb
  6. +1 −1  1.8/core/array/uniq_spec.rb
  7. +2 −2 1.8/core/array/unshift_spec.rb
  8. +1 −1  1.8/core/hash/clear_spec.rb
  9. +1 −1  1.8/core/hash/delete_if_spec.rb
  10. +1 −1  1.8/core/hash/each_key_spec.rb
  11. +1 −1  1.8/core/hash/each_pair_spec.rb
  12. +1 −1  1.8/core/hash/each_spec.rb
  13. +1 −1  1.8/core/hash/each_value_spec.rb
  14. +1 −1  1.8/core/hash/element_reference_spec.rb
  15. +1 −1  1.8/core/hash/new_spec.rb
  16. +1 −1  1.8/core/hash/rehash_spec.rb
  17. +1 −1  1.8/core/hash/shared/replace.rb
  18. +2 −2 1.8/core/hash/shared/update.rb
  19. +1 −1  1.8/core/hash/to_hash_spec.rb
  20. +1 −1  1.8/core/integer/chr_spec.rb
  21. +9 −9 1.8/core/kernel/case_compare_spec.rb
  22. +1 −1  1.8/core/kernel/to_a_spec.rb
  23. +3 −3 1.8/core/numeric/remainder_spec.rb
  24. +2 −2 1.8/core/object/shared/dup_clone.rb
  25. +1 −1  1.8/core/proc/to_proc_spec.rb
  26. +1 −1  1.8/core/string/capitalize_spec.rb
  27. +2 −2 1.8/core/string/chomp_spec.rb
  28. +1 −1  1.8/core/string/chop_spec.rb
  29. +1 −1  1.8/core/string/delete_spec.rb
  30. +1 −1  1.8/core/string/downcase_spec.rb
  31. +1 −1  1.8/core/string/each_byte_spec.rb
  32. +2 −2 1.8/core/string/gsub_spec.rb
  33. +1 −1  1.8/core/string/lstrip_spec.rb
  34. +1 −1  1.8/core/string/replace_spec.rb
  35. +1 −1  1.8/core/string/reverse_spec.rb
  36. +1 −1  1.8/core/string/rstrip_spec.rb
  37. +2 −2 1.8/core/string/scan_spec.rb
  38. +1 −1  1.8/core/string/shared/concat.rb
  39. +1 −1  1.8/core/string/shared/each.rb
  40. +1 −1  1.8/core/string/shared/succ.rb
  41. +1 −1  1.8/core/string/shared/to_s.rb
  42. +1 −1  1.8/core/string/squeeze_spec.rb
  43. +1 −1  1.8/core/string/strip_spec.rb
  44. +2 −2 1.8/core/string/sub_spec.rb
  45. +1 −1  1.8/core/string/swapcase_spec.rb
  46. +1 −1  1.8/core/string/upcase_spec.rb
  47. +1 −1  1.8/language/method_spec.rb
  48. +3 −3 1.8/language/predefined_spec.rb
  49. +1 −1  1.8/language/symbol_spec.rb
  50. +2 −2 1.8/language/variables_spec.rb
  51. +2 −2 1.8/library/matrix/rows_spec.rb
  52. +3 −3 1.8/library/singleton/instance_spec.rb
  53. +6 −6 1.8/library/singleton/load_spec.rb
View
2  1.8/core/array/reject_spec.rb
@@ -30,7 +30,7 @@
describe "Array#reject!" do
it "removes elements for which block is true" do
a = [3, 4, 5, 6, 7, 8, 9, 10, 11]
- a.reject! { |i| i % 2 == 0 }.equal?(a).should == true
+ a.reject! { |i| i % 2 == 0 }.should equal(a)
a.should == [3, 5, 7, 9, 11]
a.reject! { |i| i > 8 }
a.should == [3, 5, 7]
View
2  1.8/core/array/reverse_spec.rb
@@ -15,7 +15,7 @@
describe "Array#reverse!" do
it "reverses the elements in place" do
a = [6, 3, 4, 2, 1]
- a.reverse!.equal?(a).should == true
+ a.reverse!.should equal(a)
a.should == [1, 2, 4, 3, 6]
[].reverse!.should == []
end
View
2  1.8/core/array/shared/collect.rb
@@ -16,7 +16,7 @@
describe "Array##{cmd}" do
it "replaces each element with the value returned by block" do
a = [7, 9, 3, 5]
- a.send(cmd) { |i| i - 1 }.equal?(a).should == true
+ a.send(cmd) { |i| i - 1 }.should equal(a)
a.should == [6, 8, 2, 4]
end
View
2  1.8/core/array/to_a_spec.rb
@@ -5,7 +5,7 @@
it "returns self" do
a = [1, 2, 3]
a.to_a.should == [1, 2, 3]
- a.equal?(a.to_a).should == true
+ a.should equal(a.to_a)
end
it "does not return subclass instance on Array subclasses" do
View
4 1.8/core/array/to_ary_spec.rb
@@ -4,8 +4,8 @@
describe "Array#to_ary" do
it "returns self" do
a = [1, 2, 3]
- a.equal?(a.to_ary).should == true
+ a.should equal(a.to_ary)
a = ArraySpecs::MyArray[1, 2, 3]
- a.equal?(a.to_ary).should == true
+ a.should equal(a.to_ary)
end
end
View
2  1.8/core/array/uniq_spec.rb
@@ -84,7 +84,7 @@ def self.eql?(o) taint; o.taint; true; end
it "returns self" do
a = [ "a", "a", "b", "b", "c" ]
- a.equal?(a.uniq!).should == true
+ a.should equal(a.uniq!)
end
it "returns nil if no changes are made to the array" do
View
4 1.8/core/array/unshift_spec.rb
@@ -4,9 +4,9 @@
describe "Array#unshift" do
it "prepends object to the original array" do
a = [1, 2, 3]
- a.unshift("a").equal?(a).should == true
+ a.unshift("a").should equal(a)
a.should == ['a', 1, 2, 3]
- a.unshift().equal?(a).should == true
+ a.unshift().should equal(a)
a.should == ['a', 1, 2, 3]
a.unshift(5, 4, 3)
a.should == [5, 4, 3, 'a', 1, 2, 3]
View
2  1.8/core/hash/clear_spec.rb
@@ -4,7 +4,7 @@
describe "Hash#clear" do
it "removes all key, value pairs" do
h = { 1 => 2, 3 => 4 }
- h.clear.equal?(h).should == true
+ h.clear.should equal(h)
h.should == {}
end
View
2  1.8/core/hash/delete_if_spec.rb
@@ -11,7 +11,7 @@
it "removes every entry for which block is true and returns self" do
h = {:a => 1, :b => 2, :c => 3, :d => 4}
- h.delete_if { |k,v| v % 2 == 1 }.equal?(h).should == true
+ h.delete_if { |k,v| v % 2 == 1 }.should equal(h)
h.should == {:b => 2, :d => 4}
end
View
2  1.8/core/hash/each_key_spec.rb
@@ -6,7 +6,7 @@
it "calls block once for each key, passing key" do
r = {}
h = {1 => -1, 2 => -2, 3 => -3, 4 => -4 }
- h.each_key { |k| r[k] = k }.equal?(h).should == true
+ h.each_key { |k| r[k] = k }.should equal(h)
r.should == { 1 => 1, 2 => 2, 3 => 3, 4 => 4 }
end
View
2  1.8/core/hash/each_pair_spec.rb
@@ -8,7 +8,7 @@
h = {1 => 2, 3 => 4}
h2 = h.each_pair { |*args| all_args << args }
- h2.equal?(h).should == true
+ h2.should equal(h)
all_args.should == [[1, 2], [3, 4]]
end
View
2  1.8/core/hash/each_spec.rb
@@ -12,7 +12,7 @@
it "calls block once for each entry, passing key, value" do
r = {}
h = {:a => 1, :b => 2, :c => 3, :d => 5}
- h.each { |k,v| r[k.to_s] = v.to_s }.equal?(h).should == true
+ h.each { |k,v| r[k.to_s] = v.to_s }.should equal(h)
r.should == {"a" => "1", "b" => "2", "c" => "3", "d" => "5" }
end
View
2  1.8/core/hash/each_value_spec.rb
@@ -6,7 +6,7 @@
it "calls block once for each key, passing value" do
r = []
h = { :a => -5, :b => -3, :c => -2, :d => -1, :e => -1 }
- h.each_value { |v| r << v }.equal?(h).should == true
+ h.each_value { |v| r << v }.should equal(h)
r.sort.should == [-5, -3, -2, -1, -1]
end
View
2  1.8/core/hash/element_reference_spec.rb
@@ -68,7 +68,7 @@ def obj.to_hash() { 1 => 2, 3 => 4 } end
b = h[:b]
a << "bar"
- a.equal?(b).should == true
+ a.should equal(b)
a.should == "foobar"
b.should == "foobar"
end
View
2  1.8/core/hash/new_spec.rb
@@ -9,7 +9,7 @@
it "does not create a copy of the default argument" do
str = "foo"
- Hash.new(str).default.equal?(str).should == true
+ Hash.new(str).default.should equal(str)
end
it "creates a Hash with a default_proc if passed a block" do
View
2  1.8/core/hash/rehash_spec.rb
@@ -13,7 +13,7 @@
h.key?(k1).should == false
h.keys.include?(k1).should == true
- h.rehash.equal?(h).should == true
+ h.rehash.should equal(h)
h.key?(k1).should == true
h[k1].should == 0
View
2  1.8/core/hash/shared/replace.rb
@@ -2,7 +2,7 @@
describe "Hash##{cmd}" do
it "replaces the contents of self with other" do
h = { :a => 1, :b => 2 }
- h.send(cmd, :c => -1, :d => -2).equal?(h).should == true
+ h.send(cmd, :c => -1, :d => -2).should equal(h)
h.should == { :c => -1, :d => -2 }
end
View
4 1.8/core/hash/shared/update.rb
@@ -2,14 +2,14 @@
describe "Hash##{cmd}" do
it "adds the entries from other, overwriting duplicate keys. Returns self" do
h = { :_1 => 'a', :_2 => '3' }
- h.send(cmd, :_1 => '9', :_9 => 2).equal?(h).should == true
+ h.send(cmd, :_1 => '9', :_9 => 2).should equal(h)
h.should == {:_1 => "9", :_2 => "3", :_9 => 2}
end
it "sets any duplicate key to the value of block if passed a block" do
h1 = { :a => 2, :b => -1 }
h2 = { :a => -2, :c => 1 }
- h1.send(cmd, h2) { |k,x,y| 3.14 }.equal?(h1).should == true
+ h1.send(cmd, h2) { |k,x,y| 3.14 }.should equal(h1)
h1.should == {:c => 1, :b => -1, :a => 3.14}
h1.send(cmd, h1) { nil }
View
2  1.8/core/hash/to_hash_spec.rb
@@ -4,6 +4,6 @@
describe "Hash#to_hash" do
it "returns self" do
h = {}
- h.to_hash.equal?(h).should == true
+ h.to_hash.should equal(h)
end
end
View
2  1.8/core/integer/chr_spec.rb
@@ -9,7 +9,7 @@
end
it "returns a new String for each call" do
- 82.chr.equal?(82.chr).should == false
+ 82.chr.should_not equal(82.chr)
end
it "raises a RangeError if self is out of the ASCII character range" do
View
18 1.8/core/kernel/case_compare_spec.rb
@@ -80,18 +80,18 @@ def object_id()
end
it "returns true if #== returns true even if #equal? is false" do
- @o1.equal?(@o2).should == false
+ @o1.should_not equal(@o2)
(@o1 == @o2).should == true
(@o1 === @o2).should == true
end
it "returns true if #equal? returns true" do
- @o1.equal?(@o1).should == true
+ @o1.should equal(@o1)
(@o1 === @o1).should == true
end
it "returns false if neither #== nor #equal? returns true" do
- @o1.equal?(@o).should == false
+ @o1.should_not equal(@o)
(@o1 == @o).should == false
(@o1 === @o).should == false
end
@@ -105,13 +105,13 @@ def object_id()
end
it "returns true if #== returns true even if #equal? is false" do
- @o1.equal?(@o1).should == false
+ @o1.should_not equal(@o1)
(@o1 == @o1).should == true
(@o1 === @o1).should == true
end
it "returns false if neither #== nor #equal? returns true" do
- @o1.equal?(@o).should == false
+ @o1.should_not equal(@o)
(@o1 == @o).should == false
(@o1 === @o).should == false
end
@@ -128,7 +128,7 @@ def object_id()
it "returns true if the object id is the same even if both #== and #equal? return false" do
@o1.object_id.should == @o1.object_id
- @o1.equal?(@o1).should == false
+ @o1.should_not equal(@o1)
(@o1 == @o1).should == false
(@o1 === @o1).should == true
@@ -139,7 +139,7 @@ def object_id()
it "returns false if both #== and #equal? return false even if object id is same" do
@o1.object_id.should == @o1.object_id
- @o1.equal?(@o1).should == false
+ @o1.should_not equal(@o1)
(@o1 == @o1).should == false
(@o1 === @o1).should == false
@@ -149,7 +149,7 @@ def object_id()
it "returns false if the object id is not the same and both #== and #equal? return false" do
@o1.object_id.should_not == @o2.object_id
- @o1.equal?(@o2).should == false
+ @o1.should_not equal(@o2)
(@o1 == @o2).should == false
(@o1 === @o2).should == false
@@ -166,7 +166,7 @@ def object_id()
it "returns true if #== or #equal? is true even if object id is different" do
@o1.object_id.should_not == @o1.object_id
- @o1.equal?(@o1).should == true
+ @o1.should equal(@o1)
(@o1 == @o1).should == true
(@o1 === @o1).should == true
View
2  1.8/core/kernel/to_a_spec.rb
@@ -10,7 +10,7 @@
describe "Kernel#to_a when the receiver is an Array" do
it "returns self" do
array = [1, 2]
- array.to_a.equal?(array).should == true
+ array.to_a.should equal(array)
end
end
View
6 1.8/core/numeric/remainder_spec.rb
@@ -12,7 +12,7 @@
@obj.should_receive(:%).with(@other).and_return(@result)
@result.should_receive(:==).with(0).and_return(true)
- @obj.remainder(@other).equal?(@result).should == true
+ @obj.remainder(@other).should equal(@result)
end
it "returns the result of calling self#% with other if self and other are greater than 0" do
@@ -24,7 +24,7 @@
@obj.should_receive(:>).with(0).and_return(true)
@other.should_receive(:<).with(0).and_return(false)
- @obj.remainder(@other).equal?(@result).should == true
+ @obj.remainder(@other).should equal(@result)
end
it "returns the result of calling self#% with other if self and other are less than 0" do
@@ -36,7 +36,7 @@
@obj.should_receive(:>).with(0).and_return(false)
- @obj.remainder(@other).equal?(@result).should == true
+ @obj.remainder(@other).should equal(@result)
end
it "returns the result of calling self#% with other - other if self is greater than 0 and other is less than 0" do
View
4 1.8/core/object/shared/dup_clone.rb
@@ -41,7 +41,7 @@ def initialize_copy(original)
o.obj = array
o2 = o.send(cmd)
- o2.obj.equal?(o.obj).should == true
+ o2.obj.should equal(o.obj)
end
it "calls #initialize_copy on the NEW object if available, passing in original object" do
@@ -50,7 +50,7 @@ def initialize_copy(original)
o.obj.should == :original
o2.obj.should == :init_copy
- o2.original.equal?(o).should == true
+ o2.original.should equal(o)
end
end
end
View
2  1.8/core/proc/to_proc_spec.rb
@@ -3,6 +3,6 @@
describe "Proc#to_proc" do
it "returns self" do
a = lambda {}
- a.to_proc.equal?(a).should == true
+ a.to_proc.should equal(a)
end
end
View
2  1.8/core/string/capitalize_spec.rb
@@ -31,7 +31,7 @@
describe "String#capitalize!" do
it "capitalizes self in place" do
a = "hello"
- a.capitalize!.equal?(a).should == true
+ a.capitalize!.should equal(a)
a.should == "Hello"
end
View
4 1.8/core/string/chomp_spec.rb
@@ -99,11 +99,11 @@ def separator.to_str() "llo" end
describe "String#chomp! with seperator" do
it "modifies self in place and returns self" do
s = "one\n"
- s.chomp!.equal?(s).should == true
+ s.chomp!.should equal(s)
s.should == "one"
t = "two\r\n"
- t.chomp!.equal?(t).should == true
+ t.chomp!.should equal(t)
t.should == "two"
u = "three\r"
View
2  1.8/core/string/chop_spec.rb
@@ -55,7 +55,7 @@
it "returns self if modifications were made" do
["hello", "hello\r\n"].each do |s|
- s.chop!.equal?(s).should == true
+ s.chop!.should equal(s)
end
end
View
2  1.8/core/string/delete_spec.rb
@@ -86,7 +86,7 @@ def other_string2.to_str() "o" end
describe "String#delete!" do
it "modifies self in place and returns self" do
a = "hello"
- a.delete!("aeiou", "^e").equal?(a).should == true
+ a.delete!("aeiou", "^e").should equal(a)
a.should == "hell"
end
View
2  1.8/core/string/downcase_spec.rb
@@ -33,7 +33,7 @@
describe "String#downcase!" do
it "modifies self in place" do
a = "HeLlO"
- a.downcase!.equal?(a).should == true
+ a.downcase!.should equal(a)
a.should == "hello"
end
View
2  1.8/core/string/each_byte_spec.rb
@@ -35,6 +35,6 @@
it "returns self" do
s = "hello"
- (s.each_byte {}).equal?(s).should == true
+ (s.each_byte {}).should equal(s)
end
end
View
4 1.8/core/string/gsub_spec.rb
@@ -303,7 +303,7 @@ def obj.to_s() "ok" end
describe "String#gsub! with pattern and replacement" do
it "modifies self in place and returns self" do
a = "hello"
- a.gsub!(/[aeiou]/, '*').equal?(a).should == true
+ a.gsub!(/[aeiou]/, '*').should equal(a)
a.should == "h*ll*"
end
@@ -335,7 +335,7 @@ def obj.to_s() "ok" end
describe "String#gsub! with pattern and block" do
it "modifies self in place and returns self" do
a = "hello"
- a.gsub!(/[aeiou]/) { '*' }.equal?(a).should == true
+ a.gsub!(/[aeiou]/) { '*' }.should equal(a)
a.should == "h*ll*"
end
View
2  1.8/core/string/lstrip_spec.rb
@@ -26,7 +26,7 @@
describe "String#lstrip!" do
it "modifies self in place and returns self" do
a = " hello "
- a.lstrip!.equal?(a).should == true
+ a.lstrip!.should equal(a)
a.should == "hello "
end
View
2  1.8/core/string/replace_spec.rb
@@ -4,7 +4,7 @@
describe "String#replace" do
it "replaces the content of self with other and returns self" do
a = "some string"
- a.replace("another string").equal?(a).should == true
+ a.replace("another string").should equal(a)
a.should == "another string"
end
View
2  1.8/core/string/reverse_spec.rb
@@ -17,7 +17,7 @@
describe "String#reverse!" do
it "reverses self in place and always returns self" do
a = "stressed"
- a.reverse!.equal?(a).should == true
+ a.reverse!.should equal(a)
a.should == "desserts"
"".reverse!.should == ""
View
2  1.8/core/string/rstrip_spec.rb
@@ -20,7 +20,7 @@
describe "String#rstrip!" do
it "modifies self in place and returns self" do
a = " hello "
- a.rstrip!.equal?(a).should == true
+ a.rstrip!.should equal(a)
a.should == " hello"
end
View
4 1.8/core/string/scan_spec.rb
@@ -84,8 +84,8 @@
describe "String#scan with pattern and block" do
it "returns self" do
s = "foo"
- s.scan(/./) {}.equal?(s).should == true
- s.scan(/roar/) {}.equal?(s).should == true
+ s.scan(/./) {}.should equal(s)
+ s.scan(/roar/) {}.should equal(s)
end
it "passes each match to the block as one argument: an array" do
View
2  1.8/core/string/shared/concat.rb
@@ -2,7 +2,7 @@
describe "String##{cmd}" do
it "concatenates the given argument to self and returns self" do
str = 'hello '
- str.send(cmd, 'world').equal?(str).should == true
+ str.send(cmd, 'world').should equal(str)
str.should == "hello world"
end
View
2  1.8/core/string/shared/each.rb
@@ -63,7 +63,7 @@
it "returns self" do
s = "hello\nworld"
- (s.send(cmd) {}).equal?(s).should == true
+ (s.send(cmd) {}).should equal(s)
end
it "tries to convert the separator to a string using to_str" do
View
2  1.8/core/string/shared/succ.rb
@@ -77,7 +77,7 @@
it "is equivalent to succ, but modifies self in place (still returns self)" do
["", "abcd", "THX1138"].each do |s|
r = s.dup.send(cmd)
- s.send(cmd).equal?(s).should == true
+ s.send(cmd).should equal(s)
s.should == r
end
end
View
2  1.8/core/string/shared/to_s.rb
@@ -2,7 +2,7 @@
describe "String##{cmd}" do
it "returns self when self.class == String" do
a = "a string"
- a.equal?(a.send(cmd)).should == true
+ a.should equal(a.send(cmd))
end
it "returns a new instance of String when called on a subclass" do
View
2  1.8/core/string/squeeze_spec.rb
@@ -84,7 +84,7 @@ def other_string2.to_str() "o" end
describe "String#squeeze!" do
it "modifies self in place and returns self" do
a = "yellow moon"
- a.squeeze!.equal?(a).should == true
+ a.squeeze!.should equal(a)
a.should == "yelow mon"
end
View
2  1.8/core/string/strip_spec.rb
@@ -19,7 +19,7 @@
describe "String#strip!" do
it "modifies self in place and returns self" do
a = " hello "
- a.strip!.equal?(a).should == true
+ a.strip!.should equal(a)
a.should == "hello"
end
View
4 1.8/core/string/sub_spec.rb
@@ -318,7 +318,7 @@ def replacement.to_str() "hello_replacement" end
describe "String#sub! with pattern, replacement" do
it "modifies self in place and returns self" do
a = "hello"
- a.sub!(/[aeiou]/, '*').equal?(a).should == true
+ a.sub!(/[aeiou]/, '*').should equal(a)
a.should == "h*llo"
end
@@ -350,7 +350,7 @@ def replacement.to_str() "hello_replacement" end
describe "String#sub! with pattern and block" do
it "modifies self in place and returns self" do
a = "hello"
- a.sub!(/[aeiou]/) { '*' }.equal?(a).should == true
+ a.sub!(/[aeiou]/) { '*' }.should equal(a)
a.should == "h*llo"
end
View
2  1.8/core/string/swapcase_spec.rb
@@ -28,7 +28,7 @@
describe "String#swapcase!" do
it "modifies self in place" do
a = "cYbEr_PuNk11"
- a.swapcase!.equal?(a).should == true
+ a.swapcase!.should equal(a)
a.should == "CyBeR_pUnK11"
end
View
2  1.8/core/string/upcase_spec.rb
@@ -33,7 +33,7 @@
describe "String#upcase!" do
it "modifies self in place" do
a = "HeLlO"
- a.upcase!.equal?(a).should == true
+ a.upcase!.should equal(a)
a.should == "HELLO"
end
View
2  1.8/language/method_spec.rb
@@ -101,7 +101,7 @@ def foo(a, b, *c); [c.size, c.last]; end
res = foo 1, 2, 3, *a
res.first.should == 2501
- res.last.equal?(obj).should == true
+ res.last.should equal(obj)
end
it "allows to pass literal hashes without curly braces as the last parameter" do
View
6 1.8/language/predefined_spec.rb
@@ -388,17 +388,17 @@ def obj.foo2; yield; end
it "includes TRUE" do
Object.const_defined?(:TRUE).should == true
- TRUE.equal?(true).should == true
+ TRUE.should equal(true)
end
it "includes FALSE" do
Object.const_defined?(:FALSE).should == true
- FALSE.equal?(false).should == true
+ FALSE.should equal(false)
end
it "includes NIL" do
Object.const_defined?(:NIL).should == true
- NIL.equal?(nil).should == true
+ NIL.should equal(nil)
end
it "includes STDIN" do
View
2  1.8/language/symbol_spec.rb
@@ -66,7 +66,7 @@
[:'a string', :'a string'],
[:"#{var}", :"#{var}"]
].each { |a, b|
- a.equal?(b).should == true
+ a.should equal(b)
}
end
end
View
4 1.8/language/variables_spec.rb
@@ -668,8 +668,8 @@ class VariableSpecCVarSpec
o_of_a, o_of_b = mock('a'), mock('b')
a, b = o_of_a, o_of_b
a, b = b, a
- a.equal?(o_of_b).should == true
- b.equal?(o_of_a).should == true
+ a.should equal(o_of_b)
+ b.should equal(o_of_a)
end
end
View
4 1.8/library/matrix/rows_spec.rb
@@ -20,8 +20,8 @@
it "copies the original rows by default" do
@a << 3
@b << 6
- @m.row(0).equal?(@a).should == false
- @m.row(1).equal?(@b).should == false
+ @m.row(0).should_not equal(@a)
+ @m.row(1).should_not equal(@b)
end
it "references the original rows if copy is false" do
View
6 1.8/library/singleton/instance_spec.rb
@@ -7,7 +7,7 @@
end
it "returns the same instance for multiple calls to instance" do
- SingletonSpecs::MyClass.instance.equal?(SingletonSpecs::MyClass.instance).should == true
+ SingletonSpecs::MyClass.instance.should equal(SingletonSpecs::MyClass.instance)
end
it "returns an instance of the singleton's subclasses" do
@@ -15,7 +15,7 @@
end
it "returns the same instance for multiple class to instance on subclasses" do
- SingletonSpecs::MyClassChild.instance.equal?(SingletonSpecs::MyClassChild.instance).should == true
+ SingletonSpecs::MyClassChild.instance.should equal(SingletonSpecs::MyClassChild.instance)
end
it "returns an instance of the singleton's clone" do
@@ -25,6 +25,6 @@
it "returns the same instance for multiple class to instance on clones" do
klone = SingletonSpecs::MyClassChild.clone
- klone.instance.equal?(klone.instance).should == true
+ klone.instance.should equal(klone.instance)
end
end
View
12 1.8/library/singleton/load_spec.rb
@@ -16,15 +16,15 @@
it "returns the singleton instance for anything passed in" do
klass = SingletonSpecs::MyClass
- klass.send(:_load, "" ).equal?(klass.instance).should == true
- klass.send(:_load, "42").equal?(klass.instance).should == true
- klass.send(:_load, 42 ).equal?(klass.instance).should == true
+ klass.send(:_load, "" ).should equal(klass.instance)
+ klass.send(:_load, "42").should equal(klass.instance)
+ klass.send(:_load, 42 ).should equal(klass.instance)
end
it "returns the singleton instance for anything passed in to subclass" do
subklass = SingletonSpecs::MyClassChild
- subklass.send(:_load, "" ).equal?(subklass.instance).should == true
- subklass.send(:_load, "42").equal?(subklass.instance).should == true
- subklass.send(:_load, 42 ).equal?(subklass.instance).should == true
+ subklass.send(:_load, "" ).should equal(subklass.instance)
+ subklass.send(:_load, "42").should equal(subklass.instance)
+ subklass.send(:_load, 42 ).should equal(subklass.instance)
end
end
Please sign in to comment.
Something went wrong with that request. Please try again.