Sha256: f91911aab45eea0e130bb0cdbfaf3506bfbfd62fad87024f32c27dd73c370010

Contents?: true

Size: 763 Bytes

Versions: 1

Compression:

Stored size: 763 Bytes

Contents

# -*- coding: utf-8 -*-
require "sixarm_ruby_string_index_after_test"

describe String do

  describe "#index_after" do

    describe "with a target that is a string" do

      it "find" do
        expect("foogoohoo".index_after("oo")).must_equal 3
      end

    end

    describe "with a target that is a string, and an offset" do

      it "finds" do
        expect("foogoohoo".index_after("oo", 3)).must_equal 6
      end

    end

    describe "with a target that is a regexp" do

      it "finds" do
        expect("foogoohoo".index_after(/oo/)).must_equal 3
      end

    end

    describe "with a target that is a regexp, and an offset" do

      it "finds" do
        expect("foogoohoo".index_after(/oo/, 3)).must_equal 6
      end

    end

  end

end

Version data entries

1 entries across 1 versions & 1 rubygems

Version Path
sixarm_ruby_string_index_after-1.0.0 test/sixarm_ruby_string_index_after_test/string/index_after_test.rb