File: new_spec.rb

package info (click to toggle)
ruby-tty-prompt 0.23.1-1
  • links: PTS, VCS
  • area: main
  • in suites: bookworm, forky, sid, trixie
  • size: 1,452 kB
  • sloc: ruby: 8,847; makefile: 4
file content (10 lines) | stat: -rw-r--r-- 321 bytes parent folder | download
1
2
3
4
5
6
7
8
9
10
# frozen_string_literal: true

RSpec.describe TTY::Prompt::Choices, ".new" do
  it "creates choices collection" do
    choice1 = TTY::Prompt::Choice.from(:label1)
    choice2 = TTY::Prompt::Choice.from(:label2)
    collection = described_class[:label1, :label2]
    expect(collection).to eq([choice1, choice2])
  end
end