mirror of
https://github.com/ruby/ruby.git
synced 2022-11-09 12:17:21 -05:00
Update to ruby/spec@cbfaf51
This commit is contained in:
parent
44f42413e6
commit
6582df26dc
41 changed files with 527 additions and 55 deletions
|
@ -13,6 +13,20 @@ describe "String#include? with String" do
|
|||
StringSpecs::MyString.new("hello").include?(StringSpecs::MyString.new("lo")).should == true
|
||||
end
|
||||
|
||||
it "returns true if both strings are empty" do
|
||||
"".should.include?("")
|
||||
"".force_encoding("EUC-JP").should.include?("")
|
||||
"".should.include?("".force_encoding("EUC-JP"))
|
||||
"".force_encoding("EUC-JP").should.include?("".force_encoding("EUC-JP"))
|
||||
end
|
||||
|
||||
it "returns true if the RHS is empty" do
|
||||
"a".should.include?("")
|
||||
"a".force_encoding("EUC-JP").should.include?("")
|
||||
"a".should.include?("".force_encoding("EUC-JP"))
|
||||
"a".force_encoding("EUC-JP").should.include?("".force_encoding("EUC-JP"))
|
||||
end
|
||||
|
||||
it "tries to convert other to string using to_str" do
|
||||
other = mock('lo')
|
||||
other.should_receive(:to_str).and_return("lo")
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue