Permalink
Browse files

Fix lstrip and rstrip spec in spec/core

  • Loading branch information...
1 parent 294aca4 commit 93539aae5f19b7ee78ef223c45da98cd37f24d70 @spastorino spastorino committed Feb 5, 2011
Showing with 7 additions and 7 deletions.
  1. +4 −4 spec/core/string/lstrip_spec.rb
  2. +3 −3 spec/core/string/rstrip_spec.rb
@@ -4,14 +4,14 @@
it "returns a string with all leading \\000 and whitespace characters removed" do
"".lstrip.should == ""
" hello ".lstrip.should == "hello "
- "\000 hello ".lstrip.should == "hello "
- "\000\t \000hello ".lstrip.should == "hello "
+ "\000 hello ".lstrip.should == "\000 hello "
+ "\000\t \000hello ".lstrip.should == "\000\t \000hello "
"hello".lstrip.should == "hello"
end
it "modifies self by removing all leading \\000 and whitespace characters" do
"\n\t This \000".lstrip!.should == "This \000"
- "\000 another one".lstrip!.should == "another one"
- "\000 \000\t\v\000two ".lstrip!.should == "two "
+ "\000 another one".lstrip!.should == nil
+ "\000 \000\t\v\000two ".lstrip!.should == nil
end
end
@@ -8,15 +8,15 @@
" hello ".rstrip.rstrip.should == " hello"
"\tgoodbye\r\n".rstrip.rstrip.should == "\tgoodbye"
"goodbye \000".rstrip.rstrip.should == "goodbye"
- "goodbye \000\t \f \000".rstrip.rstrip.should == "goodbye"
+ "goodbye \000\t \f \000".rstrip.rstrip.should == "goodbye"
end
it "modifies self by removing all trailing \\000 and whitespace characters" do
" hello ".rstrip!.should == " hello"
"\tgoodbye\r\n".rstrip!.should == "\tgoodbye"
"goodbye \000".rstrip!.should == "goodbye"
- "goodbye \000 ".rstrip!.should == "goodbye"
+ "goodbye \000 ".rstrip!.should == "goodbye \000"
"".rstrip!.should == nil
- " \n \000\v\000".rstrip!.should == ""
+ " \n \000\v\000".rstrip!.should == " \n \000"
end
end

0 comments on commit 93539aa

Please sign in to comment.