lib/watchdocs/rails/recordings/recorder.rb in watchdocs-rails-0.4.4 vs lib/watchdocs/rails/recordings/recorder.rb in watchdocs-rails-0.4.5
- old
+ new
@@ -16,11 +16,11 @@
end
private
def record_new(new_call)
- @output = if current_recordings
+ @output = if recordings_any?
current_recordings << new_call
else
[new_call]
end
end
@@ -29,9 +29,13 @@
@current ||= store.read
end
def save_recordings
store.write(output)
+ end
+
+ def recordings_any?
+ store.exists?
end
def send_recordings
Recordings.export(output, from_specs: from_specs)
end