Skip to content

A platform for community discussion. Free, open, simple.

339 B
Raw Blame
# frozen_string_literal: true

RSpec.shared_examples "a name" do
  describe "#convert" do
    it "returns the name with the converted value" do
      expect(name.convert(&:upcase).value).to eq(name.value.upcase)
    end
  end

  describe "#to_s" do
    it "returns the value" do
      expect(name.to_s).to eq(name.value)
    end
  end
end