card 1.17.1 → 1.17.2

Sign up to get free protection for your applications and to get access to all the features.
Files changed (37) hide show
  1. checksums.yaml +4 -4
  2. data/VERSION +1 -1
  3. data/config/initializers/recaptcha.rb +27 -19
  4. data/db/migrate/20160122153608_new_indeces.rb +10 -0
  5. data/db/migrate_core_cards/20130411191151_renaming_for_menu.rb +2 -2
  6. data/db/migrate_core_cards/20140317035504_account_requests_to_signups.rb +2 -2
  7. data/db/migrate_core_cards/20150202143810_import_bootstrap_layout.rb +2 -2
  8. data/db/migrate_core_cards/20150807205221_create_references_for_search_cards.rb +4 -2
  9. data/db/schema.rb +5 -1
  10. data/db/version.txt +1 -1
  11. data/lib/card.rb +3 -3
  12. data/lib/card/reference.rb +68 -52
  13. data/mod/01_core/chunk/query_reference.rb +1 -1
  14. data/mod/01_core/set/all/collection.rb +1 -1
  15. data/mod/01_core/set/all/name.rb +27 -65
  16. data/mod/01_core/set/all/pattern.rb +6 -3
  17. data/mod/01_core/set/all/references.rb +135 -62
  18. data/mod/01_core/set/all/tracked_attributes.rb +1 -1
  19. data/mod/01_core/set/all/utils.rb +2 -2
  20. data/mod/01_core/spec/set/all/references_spec.rb +4 -3
  21. data/mod/01_core/spec/set/all/tracked_attributes_spec.rb +16 -22
  22. data/mod/01_history/lib/card/act.rb +32 -30
  23. data/mod/01_history/lib/card/change.rb +26 -18
  24. data/mod/01_history/set/all/history.rb +1 -1
  25. data/mod/04_settings/set/right/structure.rb +1 -1
  26. data/mod/05_email/set/all/notify.rb +1 -1
  27. data/mod/05_email/spec/set/right/followers_spec.rb +1 -1
  28. data/mod/05_standard/set/all/rich_html/editing.rb +42 -45
  29. data/mod/05_standard/set/type/list.rb +2 -2
  30. data/mod/05_standard/spec/set/self/all_spec.rb +3 -3
  31. data/mod/05_standard/spec/set/type/list_spec.rb +3 -3
  32. data/mod/05_standard/spec/set/type/listed_by_spec.rb +2 -2
  33. data/mod/05_standard/spec/set/type/search_type_spec.rb +1 -1
  34. data/spec/lib/card/reference_spec.rb +30 -28
  35. data/spec/models/card/trash_spec.rb +63 -63
  36. data/spec/models/card/type_transition_spec.rb +34 -35
  37. metadata +3 -2
@@ -3,31 +3,39 @@ class Card
3
3
  class Change < ActiveRecord::Base
4
4
  belongs_to :action, foreign_key: :card_action_id, inverse_of: :card_changes
5
5
 
6
- def field=(value)
7
- write_attribute(:field, Card::TRACKED_FIELDS.index(value.to_s))
8
- end
6
+ class << self
7
+ def delete_actionless
8
+ joins(
9
+ 'LEFT JOIN card_actions '\
10
+ 'ON card_changes.card_action_id = card_actions.id '
11
+ ).where(
12
+ 'card_actions.id is null'
13
+ ).find_in_batches do |group|
14
+ # used to be .delete_all here, but that was failing on large dbs
15
+ puts 'deleting batch of changes'
16
+ where("id in (#{group.map(&:id).join ','})").delete_all
17
+ end
18
+ end
9
19
 
10
- def field
11
- Card::TRACKED_FIELDS[read_attribute(:field)]
20
+ def field_index value
21
+ value.is_a?(Integer) ? value : TRACKED_FIELDS.index(value.to_s)
22
+ end
23
+
24
+ def find_by_field_name value
25
+ find_by_field field_index(value)
26
+ end
12
27
  end
13
28
 
14
- def self.delete_actionless
15
- Card::Change.where(
16
- "card_action_id NOT IN (?)",
17
- Card::Action.pluck("id"),
18
- ).delete_all
29
+ def field= value
30
+ write_attribute(:field, TRACKED_FIELDS.index(value.to_s))
19
31
  end
20
32
 
21
- def find_by_field_name(value)
22
- index = value.is_a?(Integer) ? value : Card::TRACKED_FIELDS.index(value.to_s)
23
- find_by_field(index)
33
+ def field
34
+ TRACKED_FIELDS[read_attribute(:field)]
24
35
  end
25
36
 
26
- def self.find_by_field_name(value)
27
- index = value.is_a?(Integer) ? value : Card::TRACKED_FIELDS.index(value.to_s)
28
- find_by_field(index)
37
+ def find_by_field_name value
38
+ find_by_field self.class.field_index(value)
29
39
  end
30
40
  end
31
41
  end
32
-
33
-
@@ -227,7 +227,7 @@ format :html do
227
227
  %em.label.label-info
228
228
  Current
229
229
  - elsif act_view == :expanded
230
- = rollback_link act.relevant_actions_for(card, draft)
230
+ = rollback_link act.relevant_actions_for(card)
231
231
  = show_or_hide_changes_link hide_diff, act_id: act.id, act_view: act_view, rev_nr: rev_nr, current_rev_nr: current_rev_nr
232
232
  .toggle
233
233
  = fold_or_unfold_link act_id: act.id, act_view: act_view, rev_nr: rev_nr, current_rev_nr: current_rev_nr
@@ -14,7 +14,7 @@ event :update_structurees_references,
14
14
  when: proc { |c| c.db_content_changed? || c.action == :delete } do
15
15
  return unless (statement = structuree_statement)
16
16
  Auth.as_bot do
17
- Card::Query.run(statement).each(&:update_references)
17
+ Card::Query.run(statement).each(&:update_references_out)
18
18
  end
19
19
  end
20
20
 
@@ -73,7 +73,7 @@ def notable_change?
73
73
  end
74
74
 
75
75
  event :notify_followers_after_save,
76
- after: :subsequent, on: :save, when: proc { |ca| ca.notable_change? } do
76
+ after: :extend, on: :save, when: proc { |ca| ca.notable_change? } do
77
77
  notify_followers
78
78
  end
79
79
 
@@ -37,7 +37,7 @@ describe Card::Set::Right::Followers do
37
37
 
38
38
  it 'recognizes card name changes' do
39
39
  @card = Card['Look At Me']
40
- @card.update_referencers = true
40
+ @card.update_referers = true
41
41
  @card.update_attributes! name: 'Look away'
42
42
  is_expected.to eq ['Big Brother']
43
43
  end
@@ -30,22 +30,25 @@ format :html do
30
30
  # name is ready and will show up in title
31
31
  hidden[:card][:name] ||= card.name
32
32
  else
33
- # name is not ready; need generic title
34
- args[:title] ||= if card.type_id == Card.default_type_id
35
- 'New'
36
- else
37
- "New #{card.type_name}"
38
- end
33
+ args[:title] ||= generic_new_card_title
39
34
  # FIXME: - overrides nest args
40
35
  unless card.rule_card :autoname
41
36
  # prompt for name
42
- hidden[:name_prompt] = true unless hidden.has_key? :name_prompt
37
+ hidden[:name_prompt] = true unless hidden.key? :name_prompt
43
38
  args[:optional_name_formgroup] ||= :show
44
39
  end
45
40
  end
46
41
  args[:optional_name_formgroup] ||= :hide
47
42
  end
48
43
 
44
+ def generic_new_card_title
45
+ if card.type_id == Card.default_type_id
46
+ "New #{card.type_name}"
47
+ else
48
+ 'New'
49
+ end
50
+ end
51
+
49
52
  def default_new_args_for_type_field args
50
53
  if show_type_formgroup?(args)
51
54
  args[:optional_type_formgroup] = :show
@@ -63,11 +66,10 @@ format :html do
63
66
 
64
67
  def default_new_args_buttons args
65
68
  cancel_path = !main? && path(view: :missing)
66
- args[:buttons] ||= %{
67
- #{submit_button class: 'create-submit-button'}
68
- #{cancel_button class: 'create-cancel-button',
69
- href: cancel_path}
70
- }
69
+ args[:buttons] ||= [
70
+ submit_button(class: 'create-submit-button'),
71
+ cancel_button(class: 'create-cancel-button', href: cancel_path)
72
+ ].join "\n"
71
73
  end
72
74
 
73
75
  view :edit, perms: :update, tags: :unknown_ok do |args|
@@ -110,49 +112,45 @@ format :html do
110
112
  if referers.any? || descendants.any?
111
113
  msg << rename_info(referers, descendants)
112
114
  end
113
- alert 'warning' do
114
- msg
115
- end
115
+ alert('warning') { msg }
116
116
  end
117
117
 
118
118
  def rename_info referers, descendants
119
- msg = '<h6>This change will...</h6>'
120
- msg << '<ul>'
121
- if descendants.any?
122
- msg << "<li>automatically alter #{descendants.size} related name(s)." \
123
- '</li>'
124
- end
125
- if referers.any?
126
- msg << "<li>affect at least #{referers.size} reference(s) to " \
127
- "\"#{card.name}\".</li>"
119
+ effects = []
120
+ options = ''
121
+ if descendants.any? # FIXME: count, don't instantiate
122
+ effects << "automatically alter #{descendants.size} related name(s)."
128
123
  end
129
- msg << '</ul>'
130
- if referers.any?
131
- msg << '<p>You may choose to <em>update or ignore</em> the references.' \
132
- '</p>'
124
+ if referers.any? # FIXME: count, don't instantiate
125
+ count = referers.size
126
+ refs = count == 1 ? 'reference' : 'references'
127
+ effects << "affect at least #{count} #{refs} to \"#{card.name}\""
128
+ options = 'You may choose to <em>update or ignore</em> the referers.'
133
129
  end
134
- msg
130
+ effects = effects.map { |effect| "<li>#{effect}</li>" }
131
+ "<h6>This change will...</h6><ul>#{effects}</ul><p>#{options}</p>"
135
132
  end
136
133
 
137
134
  def default_edit_name_args args
138
- referers = args[:referers] = card.extended_referencers
135
+ referers = args[:referers] = card.family_referers
139
136
  args[:hidden] ||= {}
140
137
  args[:hidden].reverse_merge!(
141
138
  success: '_self',
142
139
  old_name: card.name,
143
- referers: referers.size,
144
- card: { update_referencers: false }
140
+ referers: referers.size, # FIXME: count, don't instantiate
141
+ card: { update_referers: false }
145
142
  )
146
143
  args[:optional_toolbar] ||= :show
147
- args[:buttons] =
148
- %{
149
- #{submit_button text: 'Rename and Update', disable_with: 'Renaming',
150
- class: 'renamer-updater'}
151
- #{button_tag 'Rename',
152
- data: { disable_with: 'Renaming' },
153
- class: 'renamer'}
154
- #{cancel_button href: path}
155
- }
144
+ args[:buttons] = default_rename_buttons
145
+ end
146
+
147
+ def default_rename_buttons
148
+ [submit_button(text: 'Rename and Update',
149
+ disable_with: 'Renaming',
150
+ class: 'renamer-updater'),
151
+ button_tag('Rename', data: { disable_with: 'Renaming' }, class: 'renamer'),
152
+ cancel_button(href: path)
153
+ ].join "\n"
156
154
  end
157
155
 
158
156
  view :edit_type, perms: :update do |args|
@@ -170,10 +168,9 @@ format :html do
170
168
  args[:variety] = :edit # YUCK!
171
169
  args[:optional_toolbar] ||= :show
172
170
  args[:hidden] ||= { success: { view: :edit } }
173
- args[:buttons] = %{
174
- #{submit_button}
175
- #{cancel_button href: path(view: :edit)}
176
- }
171
+ args[:buttons] = [
172
+ submit_button, cancel_button(href: path(view: :edit))
173
+ ].join "\n"
177
174
  end
178
175
 
179
176
  view :edit_rules, tags: :unknown_ok do |args|
@@ -32,7 +32,7 @@ event :create_listed_by_cards,
32
32
  if !Card[listed_by_name]
33
33
  add_subcard listed_by_name, type_id: ListedByID
34
34
  else
35
- Card[listed_by_name].update_references
35
+ Card[listed_by_name].update_references_out
36
36
  end
37
37
  end
38
38
  end
@@ -92,7 +92,7 @@ def update_listed_by_cache_for item_keys, args={}
92
92
  if Card::Cache[Card::Set::Type::ListedBy].exist? key
93
93
  if (card = Card.fetch(key))
94
94
  card.update_cached_list
95
- card.update_references
95
+ card.update_references_out
96
96
  else
97
97
  Card::Cache[Card::Set::Type::ListedBy].delete key
98
98
  end
@@ -32,11 +32,11 @@ describe Card::Set::Self::All do
32
32
  it 'should be trigger reference repair' do
33
33
  Card::Auth.as_bot do
34
34
  a = Card['A']
35
- puts a.references_to.count
35
+ puts a.references_out.count
36
36
  Card::Env.params[:task] = :repair_references
37
- puts a.references_to.count
37
+ puts a.references_out.count
38
38
  @all.update_attributes({})
39
- puts a.references_to.count
39
+ puts a.references_out.count
40
40
 
41
41
  end
42
42
  end
@@ -66,7 +66,7 @@ describe Card::Set::Type::List do
66
66
  context 'when the name of Stam Broker changed to Stam Trader' do
67
67
  before do
68
68
  Card['Stam Broker'].update_attributes!(
69
- name: 'Stam Trader', update_referencers: true
69
+ name: 'Stam Trader', update_referers: true
70
70
  )
71
71
  end
72
72
  it { is_expected.to eq ['Darles Chickens', 'Stam Trader'] }
@@ -123,7 +123,7 @@ describe Card::Set::Type::List do
123
123
  context 'when the name of the cardtype books changed' do
124
124
  before do
125
125
  Card['book'].update_attributes!(
126
- type_id: Card::BasicID, update_referencers: true
126
+ type_id: Card::BasicID, update_referers: true
127
127
  )
128
128
  end
129
129
  it { is_expected.to eq ['Darles Chickens', 'Stam Broker'] }
@@ -132,7 +132,7 @@ describe Card::Set::Type::List do
132
132
  context 'when the name of the cardtype authors changed' do
133
133
  before do
134
134
  Card['author'].update_attributes!(
135
- type_id: Card::BasicID, update_referencers: true
135
+ type_id: Card::BasicID, update_referers: true
136
136
  )
137
137
  end
138
138
  it { is_expected.to eq ['Darles Chickens', 'Stam Broker'] }
@@ -106,7 +106,7 @@ describe Card::Set::Type::ListedBy do
106
106
  Card::Auth.as_bot do
107
107
  Card['Parry Hotter'].update_attributes!(
108
108
  name: 'Parry Moppins',
109
- update_referencers: true
109
+ update_referers: true
110
110
  )
111
111
  end
112
112
  end
@@ -117,7 +117,7 @@ describe Card::Set::Type::ListedBy do
117
117
  before do
118
118
  Card['Darles Chickens'].update_attributes!(
119
119
  name: 'Darles Eggs',
120
- update_referencers: true
120
+ update_referers: true
121
121
  )
122
122
  end
123
123
  subject { Card.fetch('Darles Eggs+books').item_names.sort }
@@ -44,7 +44,7 @@ describe Card::Set::Type::SearchType do
44
44
  end
45
45
 
46
46
  it 'updates query if referee changed' do
47
- Card['Y'].update_attributes! name: 'YYY', update_referencers: true
47
+ Card['Y'].update_attributes! name: 'YYY', update_referers: true
48
48
  expect(subject.content).to eq '{"name":"YYY"}'
49
49
  end
50
50
 
@@ -37,14 +37,14 @@ describe Card::Reference do
37
37
  newcard 'Submarine', '[[Yellow]]'
38
38
  newcard 'Sun', '[[Yellow]]'
39
39
  newcard 'Yellow'
40
- yellow_refs = Card['Yellow'].referencers.map(&:name).sort
40
+ yellow_refs = Card['Yellow'].referers.map(&:name).sort
41
41
  expect(yellow_refs).to eq(%w{ Banana Submarine Sun })
42
42
 
43
43
  y = Card['Yellow']
44
44
  y.type_id = Card.fetch_id 'UserForm'
45
45
  y.save!
46
46
 
47
- yellow_refs = Card['Yellow'].referencers.map(&:name).sort
47
+ yellow_refs = Card['Yellow'].referers.map(&:name).sort
48
48
  expect(yellow_refs).to eq(%w{ Banana Submarine Sun })
49
49
  end
50
50
 
@@ -61,7 +61,7 @@ describe Card::Reference do
61
61
  @e = newcard('Earthman')
62
62
  @e.update_attributes! name: 'Ethan' # NOW there is an Ethan card
63
63
  # do we need the links to be caught before reloading the card?
64
- expect(Card['Ethan'].referencers.map(&:name).include?('L')).not_to eq(nil)
64
+ expect(Card['Ethan'].referers.map(&:name).include?('L')).not_to eq(nil)
65
65
  end
66
66
 
67
67
  it 'should update references on rename when requested' do
@@ -70,18 +70,18 @@ describe Card::Reference do
70
70
  lew = newcard('Lew', 'likes [[watermelon]] and [[watermelon+seeds|seeds]]')
71
71
 
72
72
  watermelon = Card['watermelon']
73
- watermelon.update_referencers = true
73
+ watermelon.update_referers = true
74
74
  watermelon.name = 'grapefruit'
75
75
  watermelon.save!
76
76
  result = 'likes [[grapefruit]] and [[grapefruit+seeds|seeds]]'
77
77
  expect(lew.reload.content).to eq(result)
78
78
  end
79
79
 
80
- it 'should update referencers on rename when requested (case 2)' do
80
+ it 'should update referers on rename when requested (case 2)' do
81
81
  card = Card['Administrator Menu+*self+*read']
82
82
  old_refs = Card::Reference.where(referee_id: Card::AdministratorID)
83
83
 
84
- card.update_referencers = true
84
+ card.update_referers = true
85
85
  card.name = 'Administrator Menu+*type+*read'
86
86
  card.save
87
87
 
@@ -90,37 +90,39 @@ describe Card::Reference do
90
90
  end
91
91
 
92
92
  it 'should not update references when not requested' do
93
- newcard 'watermelon', 'mmmm'
94
- newcard 'watermelon+seeds', 'black'
93
+ watermelon = newcard 'watermelon', 'mmmm'
94
+ watermelon_seeds = newcard 'watermelon+seeds', 'black'
95
95
  lew = newcard('Lew', 'likes [[watermelon]] and [[watermelon+seeds|seeds]]')
96
96
 
97
- assert_equal [1, 1, 1, 1], lew.references_to.map(&:present),
98
- 'links should not be Wanted before'
97
+ assert_equal [watermelon.id, watermelon_seeds.id],
98
+ lew.references_out.order(:id).map(&:referee_id),
99
+ 'should store referee ids'
99
100
 
100
101
  watermelon = Card['watermelon']
101
- watermelon.update_referencers = false
102
+ watermelon.update_referers = false
102
103
  watermelon.name = 'grapefruit'
103
104
  watermelon.save!
105
+
104
106
  correct_content = 'likes [[watermelon]] and [[watermelon+seeds|seeds]]'
105
107
  expect(lew.reload.content).to eq(correct_content)
106
108
 
107
- ref_types = lew.references_to.order(:id).map(&:ref_type)
108
- assert_equal ref_types, ['L', 'P', 'P', 'L'], 'links should be a LINK'
109
- refs_are_present = lew.references_to.order(:id).map(&:present)
110
- assert_equal refs_are_present, [0, 0, 1, 0],
111
- 'only reference to +seeds should be present'
109
+ ref_types = lew.references_out.order(:id).map(&:ref_type)
110
+ assert_equal ref_types, %w(L L P), 'need partial references!'
111
+ actual_referee_ids = lew.references_out.order(:id).map(&:referee_id)
112
+ assert_equal actual_referee_ids, [nil, nil, Card.fetch_id('seed')],
113
+ 'only partial reference to "seeds" should have referee_id'
112
114
  end
113
115
 
114
116
  it 'update referencing content on rename junction card' do
115
117
  @ab = Card['A+B'] # linked to from X, included by Y
116
- @ab.update_attributes! name: 'Peanut+Butter', update_referencers: true
118
+ @ab.update_attributes! name: 'Peanut+Butter', update_referers: true
117
119
  @x = Card['X']
118
120
  expect(@x.content).to eq('[[A]] [[Peanut+Butter]] [[T]]')
119
121
  end
120
122
 
121
123
  it 'update referencing content on rename junction card' do
122
124
  @ab = Card['A+B'] # linked to from X, included by Y
123
- @ab.update_attributes! name: 'Peanut+Butter', update_referencers: false
125
+ @ab.update_attributes! name: 'Peanut+Butter', update_referers: false
124
126
  @x = Card['X']
125
127
  expect(@x.content).to eq('[[A]] [[A+B]] [[T]]')
126
128
  end
@@ -139,7 +141,7 @@ describe Card::Reference do
139
141
  it 'simple link' do
140
142
  Card.create name: 'alpha'
141
143
  Card.create name: 'beta', content: 'I link to [[alpha]]'
142
- expect(Card['alpha'].referencers.map(&:name)).to eq(['beta'])
144
+ expect(Card['alpha'].referers.map(&:name)).to eq(['beta'])
143
145
  expect(Card['beta'].referees.map(&:name)).to eq(['alpha'])
144
146
  end
145
147
 
@@ -147,7 +149,7 @@ describe Card::Reference do
147
149
  Card.create! name: 'alpha card'
148
150
  Card.create! name: 'beta card', content: 'I link to [[alpha_card]]'
149
151
  expect(Card['beta card'].referees.map(&:name)).to eq(['alpha card'])
150
- expect(Card['alpha card'].referencers.map(&:name)).to eq(['beta card'])
152
+ expect(Card['alpha card'].referers.map(&:name)).to eq(['beta card'])
151
153
  end
152
154
 
153
155
  it 'simple inclusion' do
@@ -161,7 +163,7 @@ describe Card::Reference do
161
163
  Card.create name: 'alpha'
162
164
  Card.create name: 'beta', content: 'I link to [[alpha|ALPHA]]'
163
165
  expect(Card['beta'].referees.map(&:name)).to eq(['alpha'])
164
- expect(Card['alpha'].referencers.map(&:name)).to eq(['beta'])
166
+ expect(Card['alpha'].referers.map(&:name)).to eq(['beta'])
165
167
  end
166
168
 
167
169
  it 'query' do
@@ -170,8 +172,8 @@ describe Card::Reference do
170
172
  name: 'search with references',
171
173
  content: '{"name":"X", "right_plus":["Y",{"content":["in","A","B"]}]}'
172
174
  )
173
- y_referencers = Card['Y'].referencers.map &:name
174
- expect(y_referencers).to include('search with references')
175
+ y_referers = Card['Y'].referers.map(&:name)
176
+ expect(y_referers).to include('search with references')
175
177
 
176
178
  search_referees = Card['search with references'].referees.map(&:name).sort
177
179
  expect(search_referees).to eq(%w{ A B X Y })
@@ -179,13 +181,13 @@ describe Card::Reference do
179
181
 
180
182
  it 'handles contextual names in Basic cards' do
181
183
  Card.create type: 'Basic', name: 'basic w refs', content: '{{_+A}}'
182
- Card['A'].update_attributes! name: 'AAA', update_referencers: true
184
+ Card['A'].update_attributes! name: 'AAA', update_referers: true
183
185
  expect(Card['basic w refs'].content).to eq '{{_+AAA}}'
184
186
  end
185
187
 
186
188
  it 'handles contextual names in Search cards' do
187
189
  Card.create type: 'Search', name: 'search w refs', content: '{"name":"_+A"}'
188
- Card['A'].update_attributes! name: 'AAA', update_referencers: true
190
+ Card['A'].update_attributes! name: 'AAA', update_referers: true
189
191
  expect(Card['search w refs'].content).to eq '{"name":"_+AAA"}'
190
192
  end
191
193
 
@@ -197,8 +199,8 @@ describe Card::Reference do
197
199
  it 'pickup new links on create' do
198
200
  @l = newcard('woof', '[[Lewdog]]') # no Lewdog card yet...
199
201
  @e = newcard('Lewdog') # now there is
200
- # NOTE @e.referencers does not work, you have to reload
201
- expect(@e.reload.referencers.map(&:name).include?('woof')).not_to eq(nil)
202
+ # NOTE @e.referers does not work, you have to reload
203
+ expect(@e.reload.referers.map(&:name).include?('woof')).not_to eq(nil)
202
204
  end
203
205
 
204
206
  it 'pickup new inclusions on create' do
@@ -206,6 +208,6 @@ describe Card::Reference do
206
208
  # no Lewdog card yet...
207
209
  @e = Card.new name: 'Lewdog', content: 'grrr'
208
210
  # now it's inititated
209
- expect(@e.name_referencers.map(&:name).include?('woof')).not_to eq(nil)
211
+ expect(@e.name_referers.map(&:name).include?('woof')).not_to eq(nil)
210
212
  end
211
213
  end