mas-rad_core 0.0.99 → 0.0.100
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/app/models/snapshot.rb +8 -11
- data/lib/mas/rad_core/version.rb +1 -1
- data/spec/dummy/log/test.log +193939 -0
- data/spec/models/snapshot_spec.rb +5 -6
- metadata +2 -2
@@ -6,16 +6,15 @@ RSpec.describe Snapshot do
|
|
6
6
|
|
7
7
|
describe '#save_and_run' do
|
8
8
|
it 'runs all queries and sets the count of their result' do
|
9
|
-
query_methods = subject.
|
10
|
-
query_methods.each_with_index do |
|
11
|
-
allow(subject).to receive(
|
9
|
+
query_methods = subject.metrics_in_order.map { |metric| "query_#{metric}" }
|
10
|
+
query_methods.each_with_index do |query_method, index|
|
11
|
+
allow(subject).to receive(query_method).and_return(Array.new(index))
|
12
12
|
end
|
13
13
|
|
14
14
|
subject.run_queries_and_save
|
15
15
|
|
16
|
-
|
17
|
-
|
18
|
-
expect(subject.send(attr)).to eq(i)
|
16
|
+
subject.metrics_in_order.each_with_index do |metric, index|
|
17
|
+
expect(subject.send(metric)).to eq(index)
|
19
18
|
end
|
20
19
|
end
|
21
20
|
end
|
metadata
CHANGED
@@ -1,14 +1,14 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: mas-rad_core
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 0.0.
|
4
|
+
version: 0.0.100
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Ben Lovell
|
8
8
|
autorequire:
|
9
9
|
bindir: bin
|
10
10
|
cert_chain: []
|
11
|
-
date: 2016-02-
|
11
|
+
date: 2016-02-19 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: rails
|