mas-rad_core 0.0.103 → 0.0.104
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/app/models/firm.rb +4 -0
- data/lib/mas/rad_core/version.rb +1 -1
- data/spec/dummy/log/test.log +98577 -0
- data/spec/models/firm_spec.rb +29 -0
- metadata +2 -2
data/spec/models/firm_spec.rb
CHANGED
@@ -1,6 +1,35 @@
|
|
1
1
|
RSpec.describe Firm do
|
2
2
|
subject(:firm) { build(:firm) }
|
3
3
|
|
4
|
+
describe 'languages_used' do
|
5
|
+
context 'when there are no firms' do
|
6
|
+
it 'has no languages' do
|
7
|
+
expect(Firm.languages_used).to be_empty
|
8
|
+
end
|
9
|
+
end
|
10
|
+
|
11
|
+
context 'when there are firms with no languages set' do
|
12
|
+
it 'has no languages' do
|
13
|
+
create(:firm, languages: [])
|
14
|
+
expect(Firm.languages_used).to be_empty
|
15
|
+
end
|
16
|
+
end
|
17
|
+
|
18
|
+
context 'when there are a multiple languages on multiple firms' do
|
19
|
+
it 'has has multiple languages' do
|
20
|
+
create(:firm, languages: ['sco', 'swe'])
|
21
|
+
create(:firm, languages: ['nor', 'lat'])
|
22
|
+
expect(Firm.languages_used).to eq(['lat', 'nor', 'sco', 'swe'])
|
23
|
+
end
|
24
|
+
|
25
|
+
it 'has has duplicate languages' do
|
26
|
+
create(:firm, languages: ['sco', 'swe'])
|
27
|
+
create(:firm, languages: ['nor', 'swe'])
|
28
|
+
expect(Firm.languages_used).to eq(['nor', 'sco', 'swe'])
|
29
|
+
end
|
30
|
+
end
|
31
|
+
end
|
32
|
+
|
4
33
|
describe 'default behaviour' do
|
5
34
|
it 'sets ethical_investing_flag to false' do
|
6
35
|
expect(Firm.new.ethical_investing_flag).to be_falsey
|
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.104
|
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-03-
|
11
|
+
date: 2016-03-07 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: rails
|