Sha256: a452fbee3f5c2806cf3f96771a579cbf8ee7bcb0b17392154b14d53ad76f1a65

Contents?: true

Size: 548 Bytes

Versions: 1

Compression:

Stored size: 548 Bytes

Contents

require 'spec_helper'

describe "String" do
  describe ".last" do
    it "returns last characters for a string with enough characters" do
      "123456".last(4).should == "3456"
    end
    
    it "returns last characters for a string with just enough characters" do
      "12".last(2).should == "12"
    end
    
    it "returns last characters for a string with not enough characters" do
      "123456".last(9).should == "123456"
    end
    
    it "returns empty string for an empty string" do
      "".last(123).should == ""
    end
  end
end

Version data entries

1 entries across 1 versions & 1 rubygems

Version Path
fake_chargify-0.1.0 spec/string_patches_spec.rb