witch_doctor 0.1.0 → 0.1.1.1
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.
- checksums.yaml +4 -4
- data/README.md +74 -0
- data/app/controllers/witch_doctor/virus_scans_controller.rb +14 -2
- data/app/models/virus_scan.rb +4 -3
- data/lib/witch_doctor.rb +7 -0
- data/lib/witch_doctor/version.rb +1 -1
- data/spec/controllers/virus_scans_controller_spec.rb +12 -3
- data/spec/dummy/log/development.log +2 -0
- data/spec/dummy/log/test.log +18873 -0
- data/spec/factories/witch_doctor_documents.rb +3 -1
- data/spec/factories/witch_doctor_virus_scans.rb +1 -1
- data/spec/lib/witch_doctor_spec.rb +24 -0
- data/spec/models/virus_scan_spec.rb +1 -1
- metadata +4 -2
@@ -0,0 +1,24 @@
|
|
1
|
+
require 'spec_helper'
|
2
|
+
|
3
|
+
RSpec.describe 'WitchDoctor' do
|
4
|
+
describe '.time_stamper' do
|
5
|
+
context 'by default' do
|
6
|
+
it 'generate Time.now' do
|
7
|
+
expect(WitchDoctor.time_stamper.call)
|
8
|
+
.to be_within(10.seconds)
|
9
|
+
.of(Time.now)
|
10
|
+
end
|
11
|
+
end
|
12
|
+
|
13
|
+
context 'passing midnight stamp' do
|
14
|
+
before { WitchDoctor.time_stamper = -> { Time.now.midnight } }
|
15
|
+
after { WitchDoctor.time_stamper = nil }
|
16
|
+
|
17
|
+
it 'generate midnight' do
|
18
|
+
expect(WitchDoctor.time_stamper.call)
|
19
|
+
.to be_within(10.seconds)
|
20
|
+
.of(Time.now.midnight)
|
21
|
+
end
|
22
|
+
end
|
23
|
+
end
|
24
|
+
end
|
metadata
CHANGED
@@ -1,14 +1,14 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: witch_doctor
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 0.1.
|
4
|
+
version: 0.1.1.1
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Tomas Valent
|
8
8
|
autorequire:
|
9
9
|
bindir: bin
|
10
10
|
cert_chain: []
|
11
|
-
date: 2015-
|
11
|
+
date: 2015-03-04 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: rails
|
@@ -180,6 +180,7 @@ files:
|
|
180
180
|
- spec/factories/witch_doctor_virus_scans.rb
|
181
181
|
- spec/helpers/application_helper_spec.rb
|
182
182
|
- spec/lib/antivirus_spec.rb
|
183
|
+
- spec/lib/witch_doctor_spec.rb
|
183
184
|
- spec/models/virus_scan_spec.rb
|
184
185
|
- spec/permitters/virus_scan_permitter_spec.rb
|
185
186
|
- spec/spec_helper.rb
|
@@ -256,4 +257,5 @@ test_files:
|
|
256
257
|
- spec/factories/witch_doctor_virus_scans.rb
|
257
258
|
- spec/factories/witch_doctor_documents.rb
|
258
259
|
- spec/lib/antivirus_spec.rb
|
260
|
+
- spec/lib/witch_doctor_spec.rb
|
259
261
|
- spec/helpers/application_helper_spec.rb
|