diff options
Diffstat (limited to 'spec/ruby/core/symbol/succ_spec.rb')
| -rw-r--r-- | spec/ruby/core/symbol/succ_spec.rb | 18 |
1 files changed, 18 insertions, 0 deletions
diff --git a/spec/ruby/core/symbol/succ_spec.rb b/spec/ruby/core/symbol/succ_spec.rb new file mode 100644 index 0000000000..893164a2a6 --- /dev/null +++ b/spec/ruby/core/symbol/succ_spec.rb @@ -0,0 +1,18 @@ +require_relative '../../spec_helper' + +describe "Symbol#succ" do + it "returns a successor" do + :abcd.succ.should == :abce + :THX1138.succ.should == :THX1139 + end + + it "propagates a 'carry'" do + :"1999zzz".succ.should == :"2000aaa" + :ZZZ9999.succ.should == :AAAA0000 + end + + it "increments non-alphanumeric characters when no alphanumeric characters are present" do + :"<<koala>>".succ.should == :"<<koalb>>" + :"***".succ.should == :"**+" + end +end |
