Sha256: 282c442731835e5f3f4dda64c80c3686d4c6e91a95a1fed0c4721d959cd3d841

Contents?: true

Size: 618 Bytes

Versions: 4

Compression:

Stored size: 618 Bytes

Contents

# frozen_string_literal: true
require_relative "../spec_helper"
RSpec.describe "UNDER_HUNDRED" do
  let(:subject) do
    ToRussianWords::UnderHundred::NOMINATIVE_UNDER_HUNDRED
  end

  it { is_expected.to be_a Hash }

  it "has all keys to be integers" do
    integer_class = 1.class # Fixnum before Ruby 2.4, Integer from Ruby 2.4
    expect(subject.keys.all? { |key| key.is_a? integer_class }).to be true
  end

  it "has all values to be strings" do
    expect(subject.values.all? { |value| value.is_a? String }).to be true
  end

  it "is expected to be frozen" do
    expect(subject.frozen?).to be true
  end
end

Version data entries

4 entries across 4 versions & 1 rubygems

Version Path
to_russian_words-1.1.4 spec/to_russian_words/under_hundred_spec.rb
to_russian_words-1.1.3 spec/to_russian_words/under_hundred_spec.rb
to_russian_words-1.1.2 spec/to_russian_words/under_hundred_spec.rb
to_russian_words-1.1.1 spec/to_russian_words/under_hundred_spec.rb