ruby-progressbar 1.8.1 → 1.8.3

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
@@ -1,45 +0,0 @@
1
- require 'spec_helper'
2
-
3
- class TimeMockedWithTimecop
4
- def self.now_without_mock_time; end
5
- end
6
-
7
- class TimeMockedWithDelorean
8
- def self.now_without_delorean; end
9
- end
10
-
11
- class TimeMockedWithActiveSupport
12
- def self.__simple_stub__now; end
13
- end
14
-
15
- class UnmockedTime
16
- def self.now; end
17
- end
18
-
19
- class ProgressBar
20
- RSpec.describe Time do
21
- it 'when Time is being mocked by Timecop retrieves the unmocked Timecop time' do
22
- expect(TimeMockedWithTimecop).to receive(:now_without_mock_time).once
23
-
24
- Time.new(TimeMockedWithTimecop).now
25
- end
26
-
27
- it 'when Time is being mocked by Delorean retrieves the unmocked Delorean time' do
28
- expect(TimeMockedWithDelorean).to receive(:now_without_delorean).once
29
-
30
- Time.new(TimeMockedWithDelorean).now
31
- end
32
-
33
- it 'when Time is being mocked by ActiveSupport retrieves the unmocked time' do
34
- expect(TimeMockedWithActiveSupport).to receive(:__simple_stub__now).once
35
-
36
- Time.new(TimeMockedWithActiveSupport).now
37
- end
38
-
39
- it 'when Time is not being mocked will return the actual time' do
40
- expect(UnmockedTime).to receive(:now).once
41
-
42
- Time.new(UnmockedTime).now
43
- end
44
- end
45
- end
@@ -1,7 +0,0 @@
1
- require 'rspectacular'
2
- require 'ruby-progressbar/timer'
3
-
4
- class ProgressBar
5
- RSpec.describe Timer do
6
- end
7
- end
@@ -1,6 +0,0 @@
1
- require 'rspectacular'
2
- require 'warning_filter' if Kernel.respond_to?(:require_relative)
3
-
4
- RSpec.configure do |config|
5
- config.warnings = true
6
- end
@@ -1,17 +0,0 @@
1
- ###
2
- # In our specs, I want to make sure time gets mocked so I can accurately test
3
- # times displayed to the user.
4
- #
5
- class PBTimeTester
6
- def self.now
7
- ::Time.now
8
- end
9
- end
10
-
11
- class ProgressBar
12
- class Time
13
- def initialize(time = ::PBTimeTester)
14
- self.time = time
15
- end
16
- end
17
- end