Sha256: 1d8cf8731493bdf91b7722d9f128d794c801934a23149e7993a473ef4e7fd51f

Contents?: true

Size: 351 Bytes

Versions: 15

Compression:

Stored size: 351 Bytes

Contents

# encoding: utf-8

RSpec.describe TTY::Prompt::Choices, '.each' do
  it "iterates over collection" do
    choices = described_class[:large, :medium, :small]
    actual = []
    choices.each do |choice|
      actual << choice.name
    end
    expect(actual).to eq([:large, :medium, :small])
    expect(choices.each).to be_kind_of(Enumerator)
  end
end

Version data entries

15 entries across 15 versions & 1 rubygems

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