Sha256: dc632057c675adf704633ed20ffe067b2ba413dc79692f532e4cd5e13ae7b525

Contents?: true

Size: 332 Bytes

Versions: 15

Compression:

Stored size: 332 Bytes

Contents

# encoding: utf-8

RSpec.describe TTY::Prompt::Choices, '#<<' do
  it "adds choice to collection" do
    choices = described_class.new
    expect(choices).to be_empty
    choice = TTY::Prompt::Choice.from([:label, 1])
    choices << [:label, 1]
    expect(choices.size).to eq(1)
    expect(choices.to_ary).to eq([choice])
  end
end

Version data entries

15 entries across 15 versions & 1 rubygems

Version Path
tty-prompt-0.17.2 spec/unit/choices/add_spec.rb
tty-prompt-0.17.1 spec/unit/choices/add_spec.rb
tty-prompt-0.17.0 spec/unit/choices/add_spec.rb
tty-prompt-0.12.0 spec/unit/choices/add_spec.rb
tty-prompt-0.11.0 spec/unit/choices/add_spec.rb
tty-prompt-0.10.1 spec/unit/choices/add_spec.rb
tty-prompt-0.10.0 spec/unit/choices/add_spec.rb
tty-prompt-0.9.0 spec/unit/choices/add_spec.rb
tty-prompt-0.8.0 spec/unit/choices/add_spec.rb
tty-prompt-0.7.1 spec/unit/choices/add_spec.rb
tty-prompt-0.7.0 spec/unit/choices/add_spec.rb
tty-prompt-0.6.0 spec/unit/choices/add_spec.rb
tty-prompt-0.5.0 spec/unit/choices/add_spec.rb
tty-prompt-0.4.0 spec/unit/choices/add_spec.rb
tty-prompt-0.3.0 spec/unit/choices/add_spec.rb