File: inspect_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 (19 lines) | stat: -rw-r--r-- 462 bytes parent folder | download
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
# frozen_string_literal: true

RSpec.describe TTY::Prompt, "#inspect" do
  it "inspects instance attributes" do
    prompt = TTY::Prompt::Test.new

    expect(prompt.inspect).to eq([
      "#<TTY::Prompt::Test",
      "prefix=\"\"",
      "quiet=false",
      "enabled_color=true",
      "active_color=:green",
      "error_color=:red",
      "help_color=:bright_black",
      "input=#{prompt.input}",
      "output=#{prompt.output}>"
    ].join(" "))
  end
end