voting 0.1.0

Sign up to get free protection for your applications and to get access to all the features.
Files changed (54) hide show
  1. checksums.yaml +7 -0
  2. data/CHANGELOG.md +3 -0
  3. data/LICENSE +21 -0
  4. data/README.md +229 -0
  5. data/lib/generators/voting/install_generator.rb +19 -0
  6. data/lib/generators/voting/templates/db/migrate/create_voting_tables.rb +35 -0
  7. data/lib/voting.rb +10 -0
  8. data/lib/voting/models/voting/extension.rb +85 -0
  9. data/lib/voting/models/voting/vote.rb +45 -0
  10. data/lib/voting/models/voting/voting.rb +73 -0
  11. data/lib/voting/version.rb +5 -0
  12. data/spec/factories/article.rb +5 -0
  13. data/spec/factories/author.rb +5 -0
  14. data/spec/factories/category.rb +5 -0
  15. data/spec/factories/comment.rb +5 -0
  16. data/spec/factories/voting/vote.rb +8 -0
  17. data/spec/factories/voting/voting.rb +9 -0
  18. data/spec/models/extension/after_save_spec.rb +37 -0
  19. data/spec/models/extension/as_spec.rb +26 -0
  20. data/spec/models/extension/down_spec.rb +26 -0
  21. data/spec/models/extension/order_by_voting_spec.rb +94 -0
  22. data/spec/models/extension/up_spec.rb +26 -0
  23. data/spec/models/extension/vote_for_spec.rb +26 -0
  24. data/spec/models/extension/vote_spec.rb +26 -0
  25. data/spec/models/extension/voted_question_spec.rb +38 -0
  26. data/spec/models/extension/voted_records_spec.rb +12 -0
  27. data/spec/models/extension/voted_spec.rb +40 -0
  28. data/spec/models/extension/votes_records_spec.rb +12 -0
  29. data/spec/models/extension/votes_spec.rb +40 -0
  30. data/spec/models/extension/voting_records_spec.rb +12 -0
  31. data/spec/models/extension/voting_spec.rb +40 -0
  32. data/spec/models/extension/voting_warm_up_spec.rb +115 -0
  33. data/spec/models/vote/create_spec.rb +273 -0
  34. data/spec/models/vote/vote_for_spec.rb +40 -0
  35. data/spec/models/vote_spec.rb +27 -0
  36. data/spec/models/voting/update_voting_spec.rb +28 -0
  37. data/spec/models/voting/values_data_spec.rb +24 -0
  38. data/spec/models/voting_spec.rb +26 -0
  39. data/spec/rails_helper.rb +11 -0
  40. data/spec/support/common.rb +22 -0
  41. data/spec/support/database_cleaner.rb +19 -0
  42. data/spec/support/db/migrate/create_articles_table.rb +7 -0
  43. data/spec/support/db/migrate/create_authors_table.rb +7 -0
  44. data/spec/support/db/migrate/create_categories_table.rb +9 -0
  45. data/spec/support/db/migrate/create_comments_table.rb +7 -0
  46. data/spec/support/factory_bot.rb +9 -0
  47. data/spec/support/migrate.rb +11 -0
  48. data/spec/support/models/article.rb +7 -0
  49. data/spec/support/models/author.rb +5 -0
  50. data/spec/support/models/category.rb +5 -0
  51. data/spec/support/models/comment.rb +5 -0
  52. data/spec/support/shared_context/with_database_records.rb +22 -0
  53. data/spec/support/shoulda.rb +10 -0
  54. metadata +257 -0
@@ -0,0 +1,40 @@
1
+ # frozen_string_literal: true
2
+
3
+ require 'rails_helper'
4
+
5
+ RSpec.describe Voting::Vote, ':vote_for' do
6
+ let!(:author) { create :author }
7
+ let!(:comment) { create :comment }
8
+
9
+ context 'with no scopeable' do
10
+ context 'when vote does not exist' do
11
+ specify { expect(described_class.vote_for(author: author, resource: comment)).to eq nil }
12
+ end
13
+
14
+ context 'when vote does not exist' do
15
+ before { create :voting_vote, author: author, resource: comment, positive: 1 }
16
+
17
+ it 'returns the record' do
18
+ expect(described_class.vote_for(author: author, resource: comment)).to eq described_class.last
19
+ end
20
+ end
21
+ end
22
+
23
+ context 'with scopeable' do
24
+ let!(:category) { create :category }
25
+
26
+ context 'when vote does not exist' do
27
+ specify { expect(described_class.vote_for(author: author, resource: comment, scopeable: category)).to eq nil }
28
+ end
29
+
30
+ context 'when vote does not exist' do
31
+ before { create :voting_vote, author: author, resource: comment, scopeable: category, positive: 1 }
32
+
33
+ it 'returns the record' do
34
+ query = described_class.vote_for(author: author, resource: comment, scopeable: category)
35
+
36
+ expect(query).to eq described_class.last
37
+ end
38
+ end
39
+ end
40
+ end
@@ -0,0 +1,27 @@
1
+ # frozen_string_literal: true
2
+
3
+ require 'rails_helper'
4
+
5
+ RSpec.describe Voting::Vote do
6
+ let!(:object) { build :voting_vote }
7
+
8
+ it { expect(object).to be_valid }
9
+
10
+ it { is_expected.to belong_to :author }
11
+ it { is_expected.to belong_to :resource }
12
+ it { is_expected.to belong_to :scopeable }
13
+
14
+ it { is_expected.to validate_presence_of :author }
15
+ it { is_expected.to validate_presence_of :negative }
16
+ it { is_expected.to validate_presence_of :positive }
17
+ it { is_expected.to validate_presence_of :resource }
18
+
19
+ it { is_expected.to validate_inclusion_of(:negative).in_array [0, 1] }
20
+ it { is_expected.to validate_inclusion_of(:positive).in_array [0, 1] }
21
+
22
+ it do
23
+ expect(object).to validate_uniqueness_of(:author_id)
24
+ .scoped_to(%i[author_type resource_id resource_type scopeable_id scopeable_type])
25
+ .case_insensitive
26
+ end
27
+ end
@@ -0,0 +1,28 @@
1
+ # frozen_string_literal: true
2
+
3
+ require 'rails_helper'
4
+ require 'support/shared_context/with_database_records'
5
+
6
+ RSpec.describe Voting::Voting, ':update_voting' do
7
+ include_context 'with_database_records'
8
+
9
+ context 'with no scopeable' do
10
+ it 'updates the voting data of the given resource' do
11
+ record = described_class.find_by(resource: comment_1)
12
+
13
+ expect(record.estimate).to eq 0.2923292797006548
14
+ expect(record.negative).to eq 1
15
+ expect(record.positive).to eq 2
16
+ end
17
+ end
18
+
19
+ context 'with scopeable' do
20
+ it 'updates the voting data of the given resource respecting the scope' do
21
+ record = described_class.find_by(resource: comment_1, scopeable: category)
22
+
23
+ expect(record.estimate).to eq 0.1711859764448097
24
+ expect(record.negative).to eq 1
25
+ expect(record.positive).to eq 1
26
+ end
27
+ end
28
+ end
@@ -0,0 +1,24 @@
1
+ # frozen_string_literal: true
2
+
3
+ require 'rails_helper'
4
+ require 'support/shared_context/with_database_records'
5
+
6
+ RSpec.describe Voting::Voting, ':values_data' do
7
+ include_context 'with_database_records'
8
+
9
+ context 'with no scopeable' do
10
+ subject(:voting) { described_class.values_data comment_1, nil }
11
+
12
+ it { expect(voting.as_json['voting_positive']).to eq 2 }
13
+
14
+ it { expect(voting.as_json['voting_negative']).to eq 1 }
15
+ end
16
+
17
+ context 'with scopeable' do
18
+ subject(:voting) { described_class.values_data comment_1, category }
19
+
20
+ it { expect(voting.as_json['voting_positive']).to eq 1 }
21
+
22
+ it { expect(voting.as_json['voting_negative']).to eq 1 }
23
+ end
24
+ end
@@ -0,0 +1,26 @@
1
+ # frozen_string_literal: true
2
+
3
+ require 'rails_helper'
4
+
5
+ RSpec.describe Voting::Voting do
6
+ let!(:object) { build :voting_voting }
7
+
8
+ it { expect(object).to be_valid }
9
+
10
+ it { is_expected.to belong_to :resource }
11
+ it { is_expected.to belong_to :scopeable }
12
+
13
+ it { is_expected.to validate_presence_of :estimate }
14
+ it { is_expected.to validate_presence_of :negative }
15
+ it { is_expected.to validate_presence_of :positive }
16
+ it { is_expected.to validate_presence_of :resource }
17
+
18
+ it { is_expected.to validate_numericality_of(:negative).is_greater_than_or_equal_to(0).only_integer }
19
+ it { is_expected.to validate_numericality_of(:positive).is_greater_than_or_equal_to(0).only_integer }
20
+
21
+ it do
22
+ expect(object).to validate_uniqueness_of(:resource_id)
23
+ .scoped_to(%i[resource_type scopeable_id scopeable_type])
24
+ .case_insensitive
25
+ end
26
+ end
@@ -0,0 +1,11 @@
1
+ # frozen_string_literal: true
2
+
3
+ ENV['RAILS_ENV'] ||= 'test'
4
+
5
+ require 'active_record/railtie'
6
+ require 'pry-byebug'
7
+ require 'voting'
8
+
9
+ ActiveRecord::Base.establish_connection adapter: :sqlite3, database: ':memory:'
10
+
11
+ Dir[File.expand_path('support/**/*.rb', __dir__)].each { |file| require file }
@@ -0,0 +1,22 @@
1
+ # frozen_string_literal: true
2
+
3
+ require 'rspec/rails'
4
+
5
+ RSpec.configure do |config|
6
+ config.filter_run_when_matching :focus
7
+
8
+ config.disable_monkey_patching!
9
+ config.infer_spec_type_from_file_location!
10
+
11
+ config.expect_with :rspec do |expectations|
12
+ expectations.include_chain_clauses_in_custom_matcher_descriptions = true
13
+ end
14
+
15
+ config.mock_with :rspec do |mocks|
16
+ mocks.verify_partial_doubles = true
17
+ end
18
+
19
+ config.infer_base_class_for_anonymous_controllers = false
20
+ config.order = :random
21
+ config.profile_examples = true
22
+ end
@@ -0,0 +1,19 @@
1
+ # frozen_string_literal: true
2
+
3
+ require 'database_cleaner'
4
+
5
+ RSpec.configure do |config|
6
+ config.before :suite do
7
+ DatabaseCleaner.strategy = :transaction
8
+
9
+ DatabaseCleaner.clean_with :truncation
10
+ end
11
+
12
+ config.before { DatabaseCleaner.start }
13
+
14
+ config.around do |spec|
15
+ DatabaseCleaner.cleaning do
16
+ spec.run
17
+ end
18
+ end
19
+ end
@@ -0,0 +1,7 @@
1
+ # frozen_string_literal: true
2
+
3
+ class CreateArticlesTable < ActiveRecord::Migration[5.0]
4
+ def change
5
+ create_table :articles
6
+ end
7
+ end
@@ -0,0 +1,7 @@
1
+ # frozen_string_literal: true
2
+
3
+ class CreateAuthorsTable < ActiveRecord::Migration[5.0]
4
+ def change
5
+ create_table :authors
6
+ end
7
+ end
@@ -0,0 +1,9 @@
1
+ # frozen_string_literal: true
2
+
3
+ class CreateCategoriesTable < ActiveRecord::Migration[5.0]
4
+ def change
5
+ create_table :categories do |t|
6
+ t.references :article, foreign_key: true, index: true
7
+ end
8
+ end
9
+ end
@@ -0,0 +1,7 @@
1
+ # frozen_string_literal: true
2
+
3
+ class CreateCommentsTable < ActiveRecord::Migration[5.0]
4
+ def change
5
+ create_table :comments
6
+ end
7
+ end
@@ -0,0 +1,9 @@
1
+ # frozen_string_literal: true
2
+
3
+ require 'factory_bot'
4
+
5
+ Dir[File.expand_path('../factories/**/*.rb', __dir__)].each { |file| require file }
6
+
7
+ RSpec.configure do |config|
8
+ config.include FactoryBot::Syntax::Methods
9
+ end
@@ -0,0 +1,11 @@
1
+ # frozen_string_literal: true
2
+
3
+ require File.expand_path('../../lib/generators/voting/templates/db/migrate/create_voting_tables.rb', __dir__)
4
+
5
+ Dir[File.expand_path('db/migrate/*.rb', __dir__)].each { |file| require file }
6
+
7
+ CreateArticlesTable.new.change
8
+ CreateAuthorsTable.new.change
9
+ CreateCategoriesTable.new.change
10
+ CreateCommentsTable.new.change
11
+ CreateVotingTables.new.change
@@ -0,0 +1,7 @@
1
+ # frozen_string_literal: true
2
+
3
+ class Article < ::ActiveRecord::Base
4
+ voting scoping: :categories
5
+
6
+ has_many :categories
7
+ end
@@ -0,0 +1,5 @@
1
+ # frozen_string_literal: true
2
+
3
+ class Author < ::ActiveRecord::Base
4
+ voting as: :author
5
+ end
@@ -0,0 +1,5 @@
1
+ # frozen_string_literal: true
2
+
3
+ class Category < ::ActiveRecord::Base
4
+ belongs_to :article
5
+ end
@@ -0,0 +1,5 @@
1
+ # frozen_string_literal: true
2
+
3
+ class Comment < ::ActiveRecord::Base
4
+ voting
5
+ end
@@ -0,0 +1,22 @@
1
+ RSpec.shared_context 'with_database_records' do
2
+ let!(:category) { create :category }
3
+
4
+ let!(:author_1) { create :author }
5
+ let!(:author_2) { create :author }
6
+ let!(:author_3) { create :author }
7
+
8
+ let!(:comment_1) { create :comment }
9
+ let!(:comment_2) { create :comment }
10
+ let!(:comment_3) { create :comment }
11
+
12
+ let!(:vote_1) { create :voting_vote, author: author_1, positive: 1, resource: comment_1 }
13
+ let!(:vote_2) { create :voting_vote, author: author_2, negative: 1, resource: comment_1 }
14
+ let!(:vote_3) { create :voting_vote, author: author_3, positive: 1, resource: comment_1 }
15
+
16
+ let!(:vote_4) { create :voting_vote, author: author_1, negative: 1, resource: comment_2 }
17
+ let!(:vote_5) { create :voting_vote, author: author_2, positive: 1, resource: comment_2 }
18
+ let!(:vote_6) { create :voting_vote, author: author_3, negative: 1, resource: comment_2 }
19
+
20
+ let!(:vote_7) { create :voting_vote, author: author_1, resource: comment_1, positive: 1, scopeable: category }
21
+ let!(:vote_8) { create :voting_vote, author: author_2, resource: comment_1, negative: 1, scopeable: category }
22
+ end
@@ -0,0 +1,10 @@
1
+ # frozen_string_literal: true
2
+
3
+ require 'shoulda-matchers'
4
+
5
+ Shoulda::Matchers.configure do |config|
6
+ config.integrate do |with|
7
+ with.library :rails
8
+ with.test_framework :rspec
9
+ end
10
+ end
metadata ADDED
@@ -0,0 +1,257 @@
1
+ --- !ruby/object:Gem::Specification
2
+ name: voting
3
+ version: !ruby/object:Gem::Version
4
+ version: 0.1.0
5
+ platform: ruby
6
+ authors:
7
+ - Washington Botelho
8
+ autorequire:
9
+ bindir: bin
10
+ cert_chain: []
11
+ date: 2018-01-22 00:00:00.000000000 Z
12
+ dependencies:
13
+ - !ruby/object:Gem::Dependency
14
+ name: rails
15
+ requirement: !ruby/object:Gem::Requirement
16
+ requirements:
17
+ - - ">="
18
+ - !ruby/object:Gem::Version
19
+ version: '4.2'
20
+ - - "<"
21
+ - !ruby/object:Gem::Version
22
+ version: '6'
23
+ type: :runtime
24
+ prerelease: false
25
+ version_requirements: !ruby/object:Gem::Requirement
26
+ requirements:
27
+ - - ">="
28
+ - !ruby/object:Gem::Version
29
+ version: '4.2'
30
+ - - "<"
31
+ - !ruby/object:Gem::Version
32
+ version: '6'
33
+ - !ruby/object:Gem::Dependency
34
+ name: database_cleaner
35
+ requirement: !ruby/object:Gem::Requirement
36
+ requirements:
37
+ - - ">="
38
+ - !ruby/object:Gem::Version
39
+ version: '0'
40
+ type: :development
41
+ prerelease: false
42
+ version_requirements: !ruby/object:Gem::Requirement
43
+ requirements:
44
+ - - ">="
45
+ - !ruby/object:Gem::Version
46
+ version: '0'
47
+ - !ruby/object:Gem::Dependency
48
+ name: factory_bot_rails
49
+ requirement: !ruby/object:Gem::Requirement
50
+ requirements:
51
+ - - ">="
52
+ - !ruby/object:Gem::Version
53
+ version: '0'
54
+ type: :development
55
+ prerelease: false
56
+ version_requirements: !ruby/object:Gem::Requirement
57
+ requirements:
58
+ - - ">="
59
+ - !ruby/object:Gem::Version
60
+ version: '0'
61
+ - !ruby/object:Gem::Dependency
62
+ name: pry-byebug
63
+ requirement: !ruby/object:Gem::Requirement
64
+ requirements:
65
+ - - ">="
66
+ - !ruby/object:Gem::Version
67
+ version: '0'
68
+ type: :development
69
+ prerelease: false
70
+ version_requirements: !ruby/object:Gem::Requirement
71
+ requirements:
72
+ - - ">="
73
+ - !ruby/object:Gem::Version
74
+ version: '0'
75
+ - !ruby/object:Gem::Dependency
76
+ name: rspec-rails
77
+ requirement: !ruby/object:Gem::Requirement
78
+ requirements:
79
+ - - ">="
80
+ - !ruby/object:Gem::Version
81
+ version: '0'
82
+ type: :development
83
+ prerelease: false
84
+ version_requirements: !ruby/object:Gem::Requirement
85
+ requirements:
86
+ - - ">="
87
+ - !ruby/object:Gem::Version
88
+ version: '0'
89
+ - !ruby/object:Gem::Dependency
90
+ name: rubocop-rspec
91
+ requirement: !ruby/object:Gem::Requirement
92
+ requirements:
93
+ - - ">="
94
+ - !ruby/object:Gem::Version
95
+ version: '0'
96
+ type: :development
97
+ prerelease: false
98
+ version_requirements: !ruby/object:Gem::Requirement
99
+ requirements:
100
+ - - ">="
101
+ - !ruby/object:Gem::Version
102
+ version: '0'
103
+ - !ruby/object:Gem::Dependency
104
+ name: shoulda-matchers
105
+ requirement: !ruby/object:Gem::Requirement
106
+ requirements:
107
+ - - ">="
108
+ - !ruby/object:Gem::Version
109
+ version: '0'
110
+ type: :development
111
+ prerelease: false
112
+ version_requirements: !ruby/object:Gem::Requirement
113
+ requirements:
114
+ - - ">="
115
+ - !ruby/object:Gem::Version
116
+ version: '0'
117
+ - !ruby/object:Gem::Dependency
118
+ name: sqlite3
119
+ requirement: !ruby/object:Gem::Requirement
120
+ requirements:
121
+ - - ">="
122
+ - !ruby/object:Gem::Version
123
+ version: '0'
124
+ type: :development
125
+ prerelease: false
126
+ version_requirements: !ruby/object:Gem::Requirement
127
+ requirements:
128
+ - - ">="
129
+ - !ruby/object:Gem::Version
130
+ version: '0'
131
+ description: A Binomial proportion confidence interval voting system with scope and
132
+ cache enabled.
133
+ email: wbotelhos@gmail.com
134
+ executables: []
135
+ extensions: []
136
+ extra_rdoc_files: []
137
+ files:
138
+ - CHANGELOG.md
139
+ - LICENSE
140
+ - README.md
141
+ - lib/generators/voting/install_generator.rb
142
+ - lib/generators/voting/templates/db/migrate/create_voting_tables.rb
143
+ - lib/voting.rb
144
+ - lib/voting/models/voting/extension.rb
145
+ - lib/voting/models/voting/vote.rb
146
+ - lib/voting/models/voting/voting.rb
147
+ - lib/voting/version.rb
148
+ - spec/factories/article.rb
149
+ - spec/factories/author.rb
150
+ - spec/factories/category.rb
151
+ - spec/factories/comment.rb
152
+ - spec/factories/voting/vote.rb
153
+ - spec/factories/voting/voting.rb
154
+ - spec/models/extension/after_save_spec.rb
155
+ - spec/models/extension/as_spec.rb
156
+ - spec/models/extension/down_spec.rb
157
+ - spec/models/extension/order_by_voting_spec.rb
158
+ - spec/models/extension/up_spec.rb
159
+ - spec/models/extension/vote_for_spec.rb
160
+ - spec/models/extension/vote_spec.rb
161
+ - spec/models/extension/voted_question_spec.rb
162
+ - spec/models/extension/voted_records_spec.rb
163
+ - spec/models/extension/voted_spec.rb
164
+ - spec/models/extension/votes_records_spec.rb
165
+ - spec/models/extension/votes_spec.rb
166
+ - spec/models/extension/voting_records_spec.rb
167
+ - spec/models/extension/voting_spec.rb
168
+ - spec/models/extension/voting_warm_up_spec.rb
169
+ - spec/models/vote/create_spec.rb
170
+ - spec/models/vote/vote_for_spec.rb
171
+ - spec/models/vote_spec.rb
172
+ - spec/models/voting/update_voting_spec.rb
173
+ - spec/models/voting/values_data_spec.rb
174
+ - spec/models/voting_spec.rb
175
+ - spec/rails_helper.rb
176
+ - spec/support/common.rb
177
+ - spec/support/database_cleaner.rb
178
+ - spec/support/db/migrate/create_articles_table.rb
179
+ - spec/support/db/migrate/create_authors_table.rb
180
+ - spec/support/db/migrate/create_categories_table.rb
181
+ - spec/support/db/migrate/create_comments_table.rb
182
+ - spec/support/factory_bot.rb
183
+ - spec/support/migrate.rb
184
+ - spec/support/models/article.rb
185
+ - spec/support/models/author.rb
186
+ - spec/support/models/category.rb
187
+ - spec/support/models/comment.rb
188
+ - spec/support/shared_context/with_database_records.rb
189
+ - spec/support/shoulda.rb
190
+ homepage: https://github.com/wbotelhos/voting
191
+ licenses:
192
+ - MIT
193
+ metadata: {}
194
+ post_install_message:
195
+ rdoc_options: []
196
+ require_paths:
197
+ - lib
198
+ required_ruby_version: !ruby/object:Gem::Requirement
199
+ requirements:
200
+ - - ">="
201
+ - !ruby/object:Gem::Version
202
+ version: '0'
203
+ required_rubygems_version: !ruby/object:Gem::Requirement
204
+ requirements:
205
+ - - ">="
206
+ - !ruby/object:Gem::Version
207
+ version: '0'
208
+ requirements: []
209
+ rubyforge_project:
210
+ rubygems_version: 2.6.14
211
+ signing_key:
212
+ specification_version: 4
213
+ summary: A Binomial proportion confidence interval voting system with scope and cache
214
+ enabled.
215
+ test_files:
216
+ - spec/models/vote/vote_for_spec.rb
217
+ - spec/models/vote/create_spec.rb
218
+ - spec/models/voting_spec.rb
219
+ - spec/models/vote_spec.rb
220
+ - spec/models/extension/voted_records_spec.rb
221
+ - spec/models/extension/voting_spec.rb
222
+ - spec/models/extension/vote_spec.rb
223
+ - spec/models/extension/down_spec.rb
224
+ - spec/models/extension/vote_for_spec.rb
225
+ - spec/models/extension/voting_warm_up_spec.rb
226
+ - spec/models/extension/voted_question_spec.rb
227
+ - spec/models/extension/order_by_voting_spec.rb
228
+ - spec/models/extension/voting_records_spec.rb
229
+ - spec/models/extension/as_spec.rb
230
+ - spec/models/extension/voted_spec.rb
231
+ - spec/models/extension/votes_spec.rb
232
+ - spec/models/extension/after_save_spec.rb
233
+ - spec/models/extension/votes_records_spec.rb
234
+ - spec/models/extension/up_spec.rb
235
+ - spec/models/voting/update_voting_spec.rb
236
+ - spec/models/voting/values_data_spec.rb
237
+ - spec/support/migrate.rb
238
+ - spec/support/shoulda.rb
239
+ - spec/support/factory_bot.rb
240
+ - spec/support/models/article.rb
241
+ - spec/support/models/category.rb
242
+ - spec/support/models/author.rb
243
+ - spec/support/models/comment.rb
244
+ - spec/support/common.rb
245
+ - spec/support/db/migrate/create_categories_table.rb
246
+ - spec/support/db/migrate/create_authors_table.rb
247
+ - spec/support/db/migrate/create_articles_table.rb
248
+ - spec/support/db/migrate/create_comments_table.rb
249
+ - spec/support/database_cleaner.rb
250
+ - spec/support/shared_context/with_database_records.rb
251
+ - spec/factories/article.rb
252
+ - spec/factories/category.rb
253
+ - spec/factories/voting/vote.rb
254
+ - spec/factories/voting/voting.rb
255
+ - spec/factories/author.rb
256
+ - spec/factories/comment.rb
257
+ - spec/rails_helper.rb