mas-rad_core 0.0.99 → 0.0.100

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.
@@ -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.public_methods(false).select { |m| m.to_s.starts_with?('query_') }
10
- query_methods.each_with_index do |m, i|
11
- allow(subject).to receive(m).and_return(Array.new(i))
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
- query_methods.each_with_index do |m, i|
17
- attr = m.to_s.sub('query_', '').to_sym
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.99
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-18 00:00:00.000000000 Z
11
+ date: 2016-02-19 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: rails