spec/whirly_spec.rb in whirly-0.2.0 vs spec/whirly_spec.rb in whirly-0.2.1
- old
+ new
@@ -2,15 +2,15 @@
require "minitest/autorun"
# require "irbtools/binding"
require "stringio"
def short_sleep
- sleep 0.1
+ sleep 0.15
end
def medium_sleep
- sleep 0.4
+ sleep 0.5
end
def long_sleep
sleep 1
end
@@ -115,11 +115,11 @@
it "removes the spinner after stopping when :remove_after_stop is true" do
Whirly.start(hide_cursor: false, remove_after_stop: true)
short_sleep
Whirly.stop
- assert_match /\e\[u\n\z/, @capture.string
+ assert_match /\e8\n\z/, @capture.string
end
end
describe "Spinner" do
describe "Passing a Spinner" do
@@ -200,10 +200,10 @@
describe "Ansi Escape Mode" do
it "will use save and restore ANSI sequences as default (or when 'restore') is given" do
Whirly.start
short_sleep
Whirly.stop
- assert_match /\e\[s.*\e\[u/m, @capture.string
+ assert_match /\e7.*\e8/m, @capture.string
end
it "will use beginning of line and clear line ANSI sequences when 'line' is given" do
Whirly.start(ansi_escape_mode: 'line')
medium_sleep