Sha256: 19109e7ef0ec3d105d4ac78e1e9000039e74d8bb29598fb8748e534ebe794681

Contents?: true

Size: 547 Bytes

Versions: 4

Compression:

Stored size: 547 Bytes

Contents

# frozen_string_literal: true

RSpec.describe Gitmoji::Regex do
  it "has a version number" do
    expect(Gitmoji::Regex::VERSION).not_to be_nil
  end

  GITMOJI_REF.to_a.each do |gitmoji|
    it "matches #{gitmoji}" do
      expect(gitmoji).to match(Gitmoji::Regex::REGEX)
    end
  end

  describe "regex.rb source template" do
    let(:template_file) { File.read(described_class::Reference::TEMPLATE_SRC) }

    it "has the template token" do
      expect(template_file).to include("REGEX = Regexp.new(\"% gitmojiRegex %\")")
    end
  end
end

Version data entries

4 entries across 4 versions & 1 rubygems

Version Path
gitmoji-regex-0.1.3 spec/gitmoji/regex_spec.rb
gitmoji-regex-0.1.2 spec/gitmoji/regex_spec.rb
gitmoji-regex-0.1.1 spec/gitmoji/regex_spec.rb
gitmoji-regex-0.1.0 spec/gitmoji/regex_spec.rb