Sha256: a64ea8199e47feef409826aae939f6464785c40ade716d23a985e67f80ba09fb
Contents?: true
Size: 348 Bytes
Versions: 13
Compression:
Stored size: 348 Bytes
Contents
# encoding: utf-8 RSpec.describe TTY::Prompt::Choices, '#find_by' do it "finds a matching choice by key name" do collection = [{name: 'large'},{name: 'medium'},{name: 'small'}] choice = TTY::Prompt::Choice.from(name: 'small') choices = described_class[*collection] expect(choices.find_by(:name, 'small')).to eq(choice) end end
Version data entries
13 entries across 13 versions & 1 rubygems