Sha256: 68f69018366a06237bc263d920777242c67d8111628e48ae96eed7ae0d6e437a
Contents?: true
Size: 703 Bytes
Versions: 2
Compression:
Stored size: 703 Bytes
Contents
# # File:: test_ArrayComparisons.rb # Author:: wkm # Copyright:: 2009 # License:: GPL # # Unit tests for the Array#ends_with? method. # $:.unshift File.join(File.dirname(__FILE__),'..','lib') require 'test/unit' require 'sitefuel/extensions/ArrayComparisons' class TestArrayComparisons < Test::Unit::TestCase def test_ends_with # positive tests assert [1, 2, 3].ends_with?([2,3]) assert [1, 2, 3].ends_with?([]) assert [1, 2, 3].ends_with?([1, 2, 3]) assert [].ends_with?([]) assert [1].ends_with?([1]) # negative tests assert ![1, 2, 3].ends_with?([1, 2]) assert ![].ends_with?([1]) assert ![1, 2, 3].ends_with?([1, 2, 3, 4]) end end
Version data entries
2 entries across 2 versions & 1 rubygems
Version | Path |
---|---|
sitefuel-0.0.0b | test/test_ArrayComparisons.rb |
sitefuel-0.0.0a | test/test_ArrayComparisons.rb |