Sha256: 45f60a9d7d365a064b864da6a83cbb02bd7a1aef44088ee3f497dfa8f98ac2f3
Contents?: true
Size: 709 Bytes
Versions: 5
Compression:
Stored size: 709 Bytes
Contents
RSpec.describe TTY::Spinner, ":frames" do let(:output) { StringIO.new("", "w+") } it "uses custom frames from string" do frames = ".o0@*" spinner = TTY::Spinner.new(frames: frames, output: output) 5.times { spinner.spin } output.rewind expect(output.read).to eq([ "\e[1G.", "\e[1Go", "\e[1G0", "\e[1G@", "\e[1G*" ].join) end it "uses custom frames from array" do frames = [".", "o", "0", "@", "*"] spinner = TTY::Spinner.new(frames: frames, output: output) 5.times { spinner.spin } output.rewind expect(output.read).to eq([ "\e[1G.", "\e[1Go", "\e[1G0", "\e[1G@", "\e[1G*" ].join) end end
Version data entries
5 entries across 5 versions & 1 rubygems