microscope 0.5.4 → 0.5.5
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/lib/microscope/instance_method/date_instance_method.rb +1 -1
- data/lib/microscope/instance_method/datetime_instance_method.rb +1 -1
- data/lib/microscope/version.rb +1 -1
- data/spec/microscope/instance_method/date_instance_method_spec.rb +12 -2
- data/spec/microscope/instance_method/datetime_instance_method_spec.rb +10 -2
- metadata +2 -2
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA1:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 24e09b4e48791db9f310f31e0fe03e5bd128e81b
|
4
|
+
data.tar.gz: a5a0daa121df4e1881be79830ad9dc7a56c47f09
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 063f89d86a2addd04a19809b0470df9b2cad71be676223e420118540606c072d7176c608b11a406542783b5e8130973794e656a8189f398c5b90acdd670dab52
|
7
|
+
data.tar.gz: ce3228220d767572b5c511d9a30862150b437fc7729b2560c9d8355206f4d4956f8713efa4c8d61d172f16c01c3ca0cf3e32ed7947137b3c469d837f788462af
|
data/lib/microscope/version.rb
CHANGED
@@ -28,19 +28,29 @@ describe Microscope::InstanceMethod::DateInstanceMethod do
|
|
28
28
|
describe '#started=' do
|
29
29
|
before { subject.started = value }
|
30
30
|
|
31
|
-
context 'with
|
31
|
+
context 'with blank argument' do
|
32
32
|
subject { Event.create(started_on: 2.months.ago) }
|
33
33
|
let(:value) { '0' }
|
34
34
|
|
35
35
|
it { should_not be_started }
|
36
36
|
end
|
37
37
|
|
38
|
-
context 'with
|
38
|
+
context 'with present argument' do
|
39
39
|
subject { Event.create }
|
40
40
|
let(:value) { '1' }
|
41
41
|
|
42
42
|
it { should be_started }
|
43
43
|
end
|
44
|
+
|
45
|
+
context 'with present argument, twice' do
|
46
|
+
subject { Event.create(started_on: time) }
|
47
|
+
let(:time) { 2.months.ago }
|
48
|
+
let(:value) { '1' }
|
49
|
+
|
50
|
+
it { expect(subject.started_on.day).to eql time.day }
|
51
|
+
it { expect(subject.started_on.month).to eql time.month }
|
52
|
+
it { expect(subject.started_on.year).to eql time.year }
|
53
|
+
end
|
44
54
|
end
|
45
55
|
|
46
56
|
describe '#not_started?' do
|
@@ -26,19 +26,27 @@ describe Microscope::InstanceMethod::DatetimeInstanceMethod do
|
|
26
26
|
describe '#started=' do
|
27
27
|
before { subject.started = value }
|
28
28
|
|
29
|
-
context 'with
|
29
|
+
context 'with blank argument' do
|
30
30
|
subject { Event.create(started_at: 2.months.ago) }
|
31
31
|
let(:value) { '0' }
|
32
32
|
|
33
33
|
it { should_not be_started }
|
34
34
|
end
|
35
35
|
|
36
|
-
context 'with
|
36
|
+
context 'with present argument' do
|
37
37
|
subject { Event.create }
|
38
38
|
let(:value) { '1' }
|
39
39
|
|
40
40
|
it { should be_started }
|
41
41
|
end
|
42
|
+
|
43
|
+
context 'with present argument, twice' do
|
44
|
+
subject { Event.create(started_at: time) }
|
45
|
+
let(:time) { 2.months.ago }
|
46
|
+
let(:value) { '1' }
|
47
|
+
|
48
|
+
it { expect(subject.started_at).to eql time }
|
49
|
+
end
|
42
50
|
end
|
43
51
|
|
44
52
|
describe '#not_started?' do
|
metadata
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: microscope
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 0.5.
|
4
|
+
version: 0.5.5
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Simon Prévost
|
@@ -9,7 +9,7 @@ authors:
|
|
9
9
|
autorequire:
|
10
10
|
bindir: bin
|
11
11
|
cert_chain: []
|
12
|
-
date: 2014-01-
|
12
|
+
date: 2014-01-15 00:00:00.000000000 Z
|
13
13
|
dependencies:
|
14
14
|
- !ruby/object:Gem::Dependency
|
15
15
|
name: activesupport
|