spec/whirly_spec.rb in whirly-0.2.3 vs spec/whirly_spec.rb in whirly-0.2.4
- old
+ new
@@ -374,6 +374,20 @@
Whirly.start
Whirly.stop
refute_predicate Whirly, :enabled?
end
end
+
+ describe "Error Handling" do
+ it "stops the spinner, when the main thread threw an exception [gh#3]" do
+ begin
+ Whirly.start status: "working" do
+ short_sleep
+ raise 'error!'
+ end
+ rescue
+ end
+
+ refute_predicate Whirly, :enabled?
+ end
+ end
end