repo stringlengths 5 92 | file_url stringlengths 80 287 | file_path stringlengths 5 197 | content stringlengths 0 32.8k | language stringclasses 1
value | license stringclasses 7
values | commit_sha stringlengths 40 40 | retrieved_at stringdate 2026-01-04 15:37:27 2026-01-04 17:58:21 | truncated bool 2
classes |
|---|---|---|---|---|---|---|---|---|
connorshea/vglist | https://github.com/connorshea/vglist/blob/7ff3d360e861a3e224565a7ad941228f5fd462e2/spec/requests/api/mutations/users/unfollow_user_spec.rb | spec/requests/api/mutations/users/unfollow_user_spec.rb | require 'rails_helper'
RSpec.describe "UnfollowUser Mutation API", type: :request do
describe "Mutation unfollows a user" do
let(:user) { create(:confirmed_user) }
let(:application) { build(:application, owner: user) }
let(:access_token) { create(:access_token, resource_owner_id: user.id, application: ap... | ruby | MIT | 7ff3d360e861a3e224565a7ad941228f5fd462e2 | 2026-01-04T17:32:52.765079Z | false |
connorshea/vglist | https://github.com/connorshea/vglist/blob/7ff3d360e861a3e224565a7ad941228f5fd462e2/spec/requests/api/mutations/users/follow_user_spec.rb | spec/requests/api/mutations/users/follow_user_spec.rb | require 'rails_helper'
RSpec.describe "FollowUser Mutation API", type: :request do
describe "Mutation creates a new Relationship" do
let(:user) { create(:confirmed_user) }
let(:user2) { create(:confirmed_user) }
let(:application) { build(:application, owner: user) }
let(:access_token) { create(:acces... | ruby | MIT | 7ff3d360e861a3e224565a7ad941228f5fd462e2 | 2026-01-04T17:32:52.765079Z | false |
connorshea/vglist | https://github.com/connorshea/vglist/blob/7ff3d360e861a3e224565a7ad941228f5fd462e2/spec/requests/api/mutations/users/update_user_role_spec.rb | spec/requests/api/mutations/users/update_user_role_spec.rb | require 'rails_helper'
RSpec.describe "UpdateUserRole Mutation API", type: :request do
describe "Mutation updates the user's role" do
let(:application) { build(:application, owner: user) }
let(:access_token) { create(:access_token, resource_owner_id: user.id, application: application) }
let(:query_string... | ruby | MIT | 7ff3d360e861a3e224565a7ad941228f5fd462e2 | 2026-01-04T17:32:52.765079Z | false |
connorshea/vglist | https://github.com/connorshea/vglist/blob/7ff3d360e861a3e224565a7ad941228f5fd462e2/spec/requests/api/mutations/users/remove_user_avatar_spec.rb | spec/requests/api/mutations/users/remove_user_avatar_spec.rb | require 'rails_helper'
RSpec.describe "RemoveUserAvatar Mutation API", type: :request do
describe "Mutation removes the user's avatar" do
let(:application) { build(:application, owner: user) }
let(:access_token) { create(:access_token, resource_owner_id: user.id, application: application) }
let(:query_st... | ruby | MIT | 7ff3d360e861a3e224565a7ad941228f5fd462e2 | 2026-01-04T17:32:52.765079Z | false |
connorshea/vglist | https://github.com/connorshea/vglist/blob/7ff3d360e861a3e224565a7ad941228f5fd462e2/spec/requests/api/mutations/users/connect_steam_spec.rb | spec/requests/api/mutations/users/connect_steam_spec.rb | require 'rails_helper'
RSpec.describe "ConnectSteam Mutation API", type: :request do
describe "Mutation creates the ExternalAccount" do
let(:application) { build(:application, owner: user) }
let(:access_token) { create(:access_token, resource_owner_id: user.id, application: application) }
let(:query_stri... | ruby | MIT | 7ff3d360e861a3e224565a7ad941228f5fd462e2 | 2026-01-04T17:32:52.765079Z | false |
connorshea/vglist | https://github.com/connorshea/vglist/blob/7ff3d360e861a3e224565a7ad941228f5fd462e2/spec/requests/api/mutations/series/create_series_spec.rb | spec/requests/api/mutations/series/create_series_spec.rb | require 'rails_helper'
RSpec.describe "CreateSeries Mutation API", type: :request do
describe "Mutation creates a new series record" do
let(:application) { build(:application, owner: user) }
let(:access_token) { create(:access_token, resource_owner_id: user.id, application: application) }
let(:query_stri... | ruby | MIT | 7ff3d360e861a3e224565a7ad941228f5fd462e2 | 2026-01-04T17:32:52.765079Z | false |
connorshea/vglist | https://github.com/connorshea/vglist/blob/7ff3d360e861a3e224565a7ad941228f5fd462e2/spec/requests/api/mutations/series/delete_series_spec.rb | spec/requests/api/mutations/series/delete_series_spec.rb | require 'rails_helper'
RSpec.describe "DeleteSeries Mutation API", type: :request do
describe "Mutation deletes an existing series record" do
let(:application) { build(:application, owner: user) }
let(:access_token) { create(:access_token, resource_owner_id: user.id, application: application) }
let!(:ser... | ruby | MIT | 7ff3d360e861a3e224565a7ad941228f5fd462e2 | 2026-01-04T17:32:52.765079Z | false |
connorshea/vglist | https://github.com/connorshea/vglist/blob/7ff3d360e861a3e224565a7ad941228f5fd462e2/spec/requests/api/mutations/series/update_series_spec.rb | spec/requests/api/mutations/series/update_series_spec.rb | require 'rails_helper'
RSpec.describe "UpdateSeries Mutation API", type: :request do
describe "Mutation updates an existing series record" do
let(:application) { build(:application, owner: user) }
let(:access_token) { create(:access_token, resource_owner_id: user.id, application: application) }
let!(:ser... | ruby | MIT | 7ff3d360e861a3e224565a7ad941228f5fd462e2 | 2026-01-04T17:32:52.765079Z | false |
connorshea/vglist | https://github.com/connorshea/vglist/blob/7ff3d360e861a3e224565a7ad941228f5fd462e2/spec/requests/api/games/game_spec.rb | spec/requests/api/games/game_spec.rb | require 'rails_helper'
RSpec.describe "Game query API", type: :request do
describe "Query for data on games" do
let(:user) { create(:confirmed_user) }
let(:application) { build(:application, owner: user) }
let(:access_token) { create(:access_token, resource_owner_id: user.id, application: application) }
... | ruby | MIT | 7ff3d360e861a3e224565a7ad941228f5fd462e2 | 2026-01-04T17:32:52.765079Z | false |
connorshea/vglist | https://github.com/connorshea/vglist/blob/7ff3d360e861a3e224565a7ad941228f5fd462e2/spec/requests/api/games/games_spec.rb | spec/requests/api/games/games_spec.rb | require 'rails_helper'
RSpec.describe "Games API", type: :request do
describe "Query for data on games" do
let(:user) { create(:confirmed_user) }
let(:application) { build(:application, owner: user) }
let(:access_token) { create(:access_token, resource_owner_id: user.id, application: application) }
... | ruby | MIT | 7ff3d360e861a3e224565a7ad941228f5fd462e2 | 2026-01-04T17:32:52.765079Z | false |
connorshea/vglist | https://github.com/connorshea/vglist/blob/7ff3d360e861a3e224565a7ad941228f5fd462e2/spec/requests/api/games/game_search_spec.rb | spec/requests/api/games/game_search_spec.rb | require 'rails_helper'
RSpec.describe "Game Search API", type: :request do
describe "Query for data on games" do
let(:user) { create(:confirmed_user) }
let(:application) { build(:application, owner: user) }
let(:access_token) { create(:access_token, resource_owner_id: user.id, application: application) }... | ruby | MIT | 7ff3d360e861a3e224565a7ad941228f5fd462e2 | 2026-01-04T17:32:52.765079Z | false |
connorshea/vglist | https://github.com/connorshea/vglist/blob/7ff3d360e861a3e224565a7ad941228f5fd462e2/spec/requests/users/registrations_spec.rb | spec/requests/users/registrations_spec.rb | require 'rails_helper'
RSpec.describe "User Registration", type: :request do
describe "GET new_user_registration_path" do
it 'returns http success' do
get new_user_registration_path
expect(response).to have_http_status(:success)
end
end
describe "GET edit_user_registration_path" do
let(:... | ruby | MIT | 7ff3d360e861a3e224565a7ad941228f5fd462e2 | 2026-01-04T17:32:52.765079Z | false |
connorshea/vglist | https://github.com/connorshea/vglist/blob/7ff3d360e861a3e224565a7ad941228f5fd462e2/spec/requests/users/confirmations_spec.rb | spec/requests/users/confirmations_spec.rb | require 'rails_helper'
RSpec.describe "User Confirmations", type: :request do
describe "GET new_user_confirmation_path" do
it 'returns http success' do
get new_user_confirmation_path
expect(response).to have_http_status(:success)
end
end
describe "GET user_confirmation_path" do
let(:user... | ruby | MIT | 7ff3d360e861a3e224565a7ad941228f5fd462e2 | 2026-01-04T17:32:52.765079Z | false |
connorshea/vglist | https://github.com/connorshea/vglist/blob/7ff3d360e861a3e224565a7ad941228f5fd462e2/spec/requests/users/sessions_spec.rb | spec/requests/users/sessions_spec.rb | require 'rails_helper'
RSpec.describe "User Session", type: :request do
describe "GET new_user_session_path" do
it 'returns http success' do
get new_user_session_path
expect(response).to have_http_status(:success)
end
end
describe "POST user_session_path" do
let(:user) { create(:confirme... | ruby | MIT | 7ff3d360e861a3e224565a7ad941228f5fd462e2 | 2026-01-04T17:32:52.765079Z | false |
connorshea/vglist | https://github.com/connorshea/vglist/blob/7ff3d360e861a3e224565a7ad941228f5fd462e2/spec/requests/users/passwords_spec.rb | spec/requests/users/passwords_spec.rb | require 'rails_helper'
RSpec.describe "User Password", type: :request do
describe "GET new_user_password_path" do
it 'returns http success' do
get new_user_password_path
expect(response).to have_http_status(:success)
end
end
describe "GET edit_user_password_path" do
let(:user) { create(:... | ruby | MIT | 7ff3d360e861a3e224565a7ad941228f5fd462e2 | 2026-01-04T17:32:52.765079Z | false |
connorshea/vglist | https://github.com/connorshea/vglist/blob/7ff3d360e861a3e224565a7ad941228f5fd462e2/spec/helpers/activity_helper_spec.rb | spec/helpers/activity_helper_spec.rb | require 'rails_helper'
RSpec.describe ActivityHelper, type: :helper do
describe 'handleable event' do
let(:game_purchase_library_event) { create(:game_purchase_library_event) }
let(:game_purchase_completion_event1) { create(:game_purchase_completion_event, differences: { completion_status: [nil, "unplayed"] ... | ruby | MIT | 7ff3d360e861a3e224565a7ad941228f5fd462e2 | 2026-01-04T17:32:52.765079Z | false |
connorshea/vglist | https://github.com/connorshea/vglist/blob/7ff3d360e861a3e224565a7ad941228f5fd462e2/spec/helpers/users_helper_spec.rb | spec/helpers/users_helper_spec.rb | require 'rails_helper'
RSpec.describe UsersHelper, type: :helper do
describe 'checking whether current user is following other users' do
let(:user1) { create(:confirmed_user, id: rand(2..10_000)) }
let(:user2) { create(:confirmed_user, id: rand(2..10_000)) }
let(:relationship) { create(:relationship, fol... | ruby | MIT | 7ff3d360e861a3e224565a7ad941228f5fd462e2 | 2026-01-04T17:32:52.765079Z | false |
connorshea/vglist | https://github.com/connorshea/vglist/blob/7ff3d360e861a3e224565a7ad941228f5fd462e2/spec/helpers/application_helper_spec.rb | spec/helpers/application_helper_spec.rb | require 'rails_helper'
RSpec.describe ApplicationHelper, type: :helper do
describe 'flash class' do
it 'sets the correct class for a notice' do
expect(helper.flash_class(:notice)).to eq("is-info")
end
it 'sets the correct class for a success' do
expect(helper.flash_class(:success)).to eq("is... | ruby | MIT | 7ff3d360e861a3e224565a7ad941228f5fd462e2 | 2026-01-04T17:32:52.765079Z | false |
connorshea/vglist | https://github.com/connorshea/vglist/blob/7ff3d360e861a3e224565a7ad941228f5fd462e2/spec/helpers/games_helper_spec.rb | spec/helpers/games_helper_spec.rb | require 'rails_helper'
RSpec.describe GamesHelper, type: :helper do
describe 'game in user library' do
let(:game) { create(:game) }
let(:user) { create(:confirmed_user) }
let(:user_with_game) { create(:confirmed_user) }
let(:game_purchase) { create(:game_purchase, user: user_with_game, game: game) }
... | ruby | MIT | 7ff3d360e861a3e224565a7ad941228f5fd462e2 | 2026-01-04T17:32:52.765079Z | false |
connorshea/vglist | https://github.com/connorshea/vglist/blob/7ff3d360e861a3e224565a7ad941228f5fd462e2/spec/policies/genre_policy_spec.rb | spec/policies/genre_policy_spec.rb | require 'rails_helper'
RSpec.describe GenrePolicy, type: :policy do
subject(:genre_policy) { described_class.new(user, genre) }
describe 'A logged-in user' do
let(:user) { create(:user) }
let(:genre) { create(:genre) }
it "let's a normal user list, show, and search genres" do
expect(genre_polic... | ruby | MIT | 7ff3d360e861a3e224565a7ad941228f5fd462e2 | 2026-01-04T17:32:52.765079Z | false |
connorshea/vglist | https://github.com/connorshea/vglist/blob/7ff3d360e861a3e224565a7ad941228f5fd462e2/spec/policies/event_policy_spec.rb | spec/policies/event_policy_spec.rb | require 'rails_helper'
RSpec.describe EventPolicy, type: :policy do
subject(:event_policy) { described_class.new(user, event) }
describe 'A logged-in user' do
let(:user) { create(:user) }
let(:event) { create(:event, user: user) }
it "is allowed to delete their own events" do
expect(event_polic... | ruby | MIT | 7ff3d360e861a3e224565a7ad941228f5fd462e2 | 2026-01-04T17:32:52.765079Z | false |
connorshea/vglist | https://github.com/connorshea/vglist/blob/7ff3d360e861a3e224565a7ad941228f5fd462e2/spec/policies/activity_policy_spec.rb | spec/policies/activity_policy_spec.rb | require 'rails_helper'
RSpec.describe ActivityPolicy, type: :policy do
subject(:activity_policy) { described_class.new(user, event) }
describe 'A logged-in user' do
let(:user) { create(:user) }
let(:event) { create(:event) }
it "can view both activity feeds" do
expect(activity_policy).to permit... | ruby | MIT | 7ff3d360e861a3e224565a7ad941228f5fd462e2 | 2026-01-04T17:32:52.765079Z | false |
connorshea/vglist | https://github.com/connorshea/vglist/blob/7ff3d360e861a3e224565a7ad941228f5fd462e2/spec/policies/nil_class_policy_spec.rb | spec/policies/nil_class_policy_spec.rb | require 'rails_helper'
RSpec.describe NilClassPolicy, type: :policy do
subject(:nil_class_policy) { described_class.new(user, nil) }
describe 'A logged-in user' do
let(:user) { create(:user) }
it 'defaults to disallowing everything' do
expect(nil_class_policy).to forbid_actions(
[:index, :s... | ruby | MIT | 7ff3d360e861a3e224565a7ad941228f5fd462e2 | 2026-01-04T17:32:52.765079Z | false |
connorshea/vglist | https://github.com/connorshea/vglist/blob/7ff3d360e861a3e224565a7ad941228f5fd462e2/spec/policies/platform_policy_spec.rb | spec/policies/platform_policy_spec.rb | require 'rails_helper'
RSpec.describe PlatformPolicy, type: :policy do
subject(:platform_policy) { described_class.new(user, platform) }
describe 'A logged-in user' do
let(:user) { create(:user) }
let(:platform) { create(:platform) }
it "let's a normal user list, show, and search platforms" do
... | ruby | MIT | 7ff3d360e861a3e224565a7ad941228f5fd462e2 | 2026-01-04T17:32:52.765079Z | false |
connorshea/vglist | https://github.com/connorshea/vglist/blob/7ff3d360e861a3e224565a7ad941228f5fd462e2/spec/policies/user_policy_spec.rb | spec/policies/user_policy_spec.rb | require 'rails_helper'
RSpec.describe UserPolicy, type: :policy do
subject(:user_policy) { described_class.new(current_user, user) }
describe 'A logged-in user' do
let(:current_user) { create(:user) }
let(:user) { create(:user) }
it "permits actions" do
expect(user_policy).to permit_actions(
... | ruby | MIT | 7ff3d360e861a3e224565a7ad941228f5fd462e2 | 2026-01-04T17:32:52.765079Z | false |
connorshea/vglist | https://github.com/connorshea/vglist/blob/7ff3d360e861a3e224565a7ad941228f5fd462e2/spec/policies/game_purchase_policy_spec.rb | spec/policies/game_purchase_policy_spec.rb | require 'rails_helper'
RSpec.describe GamePurchasePolicy, type: :policy do
subject(:game_purchase_policy) { described_class.new(user, game_purchase) }
describe 'A logged-in user' do
let(:user) { create(:user) }
let(:game_purchase) { create(:game_purchase, user: user) }
it "is allowed to do everything... | ruby | MIT | 7ff3d360e861a3e224565a7ad941228f5fd462e2 | 2026-01-04T17:32:52.765079Z | false |
connorshea/vglist | https://github.com/connorshea/vglist/blob/7ff3d360e861a3e224565a7ad941228f5fd462e2/spec/policies/settings_policy_spec.rb | spec/policies/settings_policy_spec.rb | require 'rails_helper'
RSpec.describe SettingsPolicy, type: :policy do
subject(:settings_policy) { described_class.new(current_user, current_user) }
describe 'A logged-in user' do
let(:current_user) { create(:user) }
it { should permit_actions([:profile, :account, :import, :export, :api_token]) }
end
... | ruby | MIT | 7ff3d360e861a3e224565a7ad941228f5fd462e2 | 2026-01-04T17:32:52.765079Z | false |
connorshea/vglist | https://github.com/connorshea/vglist/blob/7ff3d360e861a3e224565a7ad941228f5fd462e2/spec/policies/company_policy_spec.rb | spec/policies/company_policy_spec.rb | require 'rails_helper'
RSpec.describe CompanyPolicy, type: :policy do
subject(:company_policy) { described_class.new(user, company) }
describe 'A logged-in user' do
let(:user) { create(:user) }
let(:company) { create(:company) }
it "let's a normal user list, show, and search companies" do
expec... | ruby | MIT | 7ff3d360e861a3e224565a7ad941228f5fd462e2 | 2026-01-04T17:32:52.765079Z | false |
connorshea/vglist | https://github.com/connorshea/vglist/blob/7ff3d360e861a3e224565a7ad941228f5fd462e2/spec/policies/relationship_policy_spec.rb | spec/policies/relationship_policy_spec.rb | require 'rails_helper'
RSpec.describe RelationshipPolicy, type: :policy do
subject(:relationship_policy) { described_class.new(current_user, followed) }
describe 'A logged-in user' do
let(:current_user) { create(:confirmed_user) }
let(:followed) { create(:confirmed_user) }
it { should permit_actions(... | ruby | MIT | 7ff3d360e861a3e224565a7ad941228f5fd462e2 | 2026-01-04T17:32:52.765079Z | false |
connorshea/vglist | https://github.com/connorshea/vglist/blob/7ff3d360e861a3e224565a7ad941228f5fd462e2/spec/policies/game_policy_spec.rb | spec/policies/game_policy_spec.rb | require 'rails_helper'
RSpec.describe GamePolicy, type: :policy do
subject(:game_policy) { described_class.new(user, game) }
describe 'A logged-in user' do
let(:user) { create(:user) }
let(:game) { create(:game) }
it 'can do basic things' do
expect(game_policy).to permit_actions(
[
... | ruby | MIT | 7ff3d360e861a3e224565a7ad941228f5fd462e2 | 2026-01-04T17:32:52.765079Z | false |
connorshea/vglist | https://github.com/connorshea/vglist/blob/7ff3d360e861a3e224565a7ad941228f5fd462e2/spec/policies/application_policy_spec.rb | spec/policies/application_policy_spec.rb | require 'rails_helper'
RSpec.describe ApplicationPolicy, type: :policy do
subject(:application_policy) { described_class.new(user, record) }
describe 'A logged-in user' do
let(:user) { create(:user) }
let(:record) { nil }
it 'defaults to disallowing everything' do
expect(application_policy).to ... | ruby | MIT | 7ff3d360e861a3e224565a7ad941228f5fd462e2 | 2026-01-04T17:32:52.765079Z | false |
connorshea/vglist | https://github.com/connorshea/vglist/blob/7ff3d360e861a3e224565a7ad941228f5fd462e2/spec/policies/engine_policy_spec.rb | spec/policies/engine_policy_spec.rb | require 'rails_helper'
RSpec.describe EnginePolicy, type: :policy do
subject(:engine_policy) { described_class.new(user, engine) }
describe 'A logged-in user' do
let(:user) { create(:user) }
let(:engine) { create(:engine) }
it "let's a normal user list, show, and search engines" do
expect(engin... | ruby | MIT | 7ff3d360e861a3e224565a7ad941228f5fd462e2 | 2026-01-04T17:32:52.765079Z | false |
connorshea/vglist | https://github.com/connorshea/vglist/blob/7ff3d360e861a3e224565a7ad941228f5fd462e2/spec/policies/admin_policy_spec.rb | spec/policies/admin_policy_spec.rb | require 'rails_helper'
RSpec.describe AdminPolicy, type: :policy do
subject(:admin_policy) { described_class.new(user, record) }
describe 'A logged-in user' do
let(:user) { create(:user) }
let(:record) { nil }
it 'defaults to disallowing everything' do
expect(admin_policy).to forbid_actions(
... | ruby | MIT | 7ff3d360e861a3e224565a7ad941228f5fd462e2 | 2026-01-04T17:32:52.765079Z | false |
connorshea/vglist | https://github.com/connorshea/vglist/blob/7ff3d360e861a3e224565a7ad941228f5fd462e2/spec/policies/series_policy_spec.rb | spec/policies/series_policy_spec.rb | require 'rails_helper'
RSpec.describe SeriesPolicy, type: :policy do
subject(:series_policy) { described_class.new(user, series) }
describe 'A logged-in user' do
let(:user) { create(:user) }
let(:series) { create(:series) }
it "let's a normal user list, show, and search series'" do
expect(serie... | ruby | MIT | 7ff3d360e861a3e224565a7ad941228f5fd462e2 | 2026-01-04T17:32:52.765079Z | false |
connorshea/vglist | https://github.com/connorshea/vglist/blob/7ff3d360e861a3e224565a7ad941228f5fd462e2/spec/policies/store_policy_spec.rb | spec/policies/store_policy_spec.rb | require 'rails_helper'
RSpec.describe StorePolicy, type: :policy do
subject(:store_policy) { described_class.new(user, store) }
describe 'A logged-in user' do
let(:user) { create(:user) }
let(:store) { create(:store) }
it "let's a normal user list, show, and search stores" do
expect(store_polic... | ruby | MIT | 7ff3d360e861a3e224565a7ad941228f5fd462e2 | 2026-01-04T17:32:52.765079Z | false |
connorshea/vglist | https://github.com/connorshea/vglist/blob/7ff3d360e861a3e224565a7ad941228f5fd462e2/spec/policies/oauth/authorization_policy_spec.rb | spec/policies/oauth/authorization_policy_spec.rb | require 'rails_helper'
RSpec.describe Oauth::AuthorizationPolicy, type: :policy do
subject(:oauth_authorization_policy) { described_class.new(user, application) }
describe 'A logged-in user' do
let(:user) { create(:user) }
let(:application) { create(:application) }
it "can do everything" do
exp... | ruby | MIT | 7ff3d360e861a3e224565a7ad941228f5fd462e2 | 2026-01-04T17:32:52.765079Z | false |
connorshea/vglist | https://github.com/connorshea/vglist/blob/7ff3d360e861a3e224565a7ad941228f5fd462e2/spec/policies/oauth/application_policy_spec.rb | spec/policies/oauth/application_policy_spec.rb | require 'rails_helper'
RSpec.describe Oauth::ApplicationPolicy, type: :policy do
subject(:oauth_application_policy) { described_class.new(user, application) }
describe 'A logged-in user that owns an application' do
let(:user) { create(:user) }
let(:application) { create(:application, owner: user) }
i... | ruby | MIT | 7ff3d360e861a3e224565a7ad941228f5fd462e2 | 2026-01-04T17:32:52.765079Z | false |
connorshea/vglist | https://github.com/connorshea/vglist/blob/7ff3d360e861a3e224565a7ad941228f5fd462e2/spec/factories/events.rb | spec/factories/events.rb | FactoryBot.define do
factory :game_purchase_library_event, class: 'Events::GamePurchaseEvent', aliases: [:event] do
user
association(:eventable, factory: :game_purchase)
event_category { :add_to_library }
end
factory :game_purchase_completion_event, class: 'Events::GamePurchaseEvent' do
user
... | ruby | MIT | 7ff3d360e861a3e224565a7ad941228f5fd462e2 | 2026-01-04T17:32:52.765079Z | false |
connorshea/vglist | https://github.com/connorshea/vglist/blob/7ff3d360e861a3e224565a7ad941228f5fd462e2/spec/factories/game_purchases.rb | spec/factories/game_purchases.rb | FactoryBot.define do
factory :game_purchase do
game
user
trait :comments do
comments { "I own this game" }
end
trait :rating do
rating { rand(0..100) }
end
trait :completion_status do
completion_status { GamePurchase.completion_statuses.values.sample }
end
tra... | ruby | MIT | 7ff3d360e861a3e224565a7ad941228f5fd462e2 | 2026-01-04T17:32:52.765079Z | false |
connorshea/vglist | https://github.com/connorshea/vglist/blob/7ff3d360e861a3e224565a7ad941228f5fd462e2/spec/factories/game_purchase_platforms.rb | spec/factories/game_purchase_platforms.rb | FactoryBot.define do
factory :game_purchase_platform do
game_purchase
platform
end
end
| ruby | MIT | 7ff3d360e861a3e224565a7ad941228f5fd462e2 | 2026-01-04T17:32:52.765079Z | false |
connorshea/vglist | https://github.com/connorshea/vglist/blob/7ff3d360e861a3e224565a7ad941228f5fd462e2/spec/factories/users.rb | spec/factories/users.rb | FactoryBot.define do
factory :user do
# Exclude id 1 to prevent flaky tests involving the behavior where users
# automatically follow the user with an ID of 1.
id { Faker::Number.unique.between(from: 2, to: 100_000) }
sequence(:email) { |n| "johndoe#{n}@example.com" }
password { "password" }
... | ruby | MIT | 7ff3d360e861a3e224565a7ad941228f5fd462e2 | 2026-01-04T17:32:52.765079Z | false |
connorshea/vglist | https://github.com/connorshea/vglist/blob/7ff3d360e861a3e224565a7ad941228f5fd462e2/spec/factories/wikidata_blocklist.rb | spec/factories/wikidata_blocklist.rb | FactoryBot.define do
factory :wikidata_blocklist do
wikidata_id { rand(0..100_000) }
name { Faker::Game.unique.title }
user
end
end
| ruby | MIT | 7ff3d360e861a3e224565a7ad941228f5fd462e2 | 2026-01-04T17:32:52.765079Z | false |
connorshea/vglist | https://github.com/connorshea/vglist/blob/7ff3d360e861a3e224565a7ad941228f5fd462e2/spec/factories/game_engines.rb | spec/factories/game_engines.rb | FactoryBot.define do
factory :game_engine do
game
engine
end
end
| ruby | MIT | 7ff3d360e861a3e224565a7ad941228f5fd462e2 | 2026-01-04T17:32:52.765079Z | false |
connorshea/vglist | https://github.com/connorshea/vglist/blob/7ff3d360e861a3e224565a7ad941228f5fd462e2/spec/factories/companies.rb | spec/factories/companies.rb | FactoryBot.define do
factory :company do
name { "Valve Corporation" }
wikidata_id { Faker::Number.number(digits: 6) }
trait :game_as_developer do
after(:create) { |company| create(:game_developer, company: company) }
end
trait :game_as_publisher do
after(:create) { |company| create(:... | ruby | MIT | 7ff3d360e861a3e224565a7ad941228f5fd462e2 | 2026-01-04T17:32:52.765079Z | false |
connorshea/vglist | https://github.com/connorshea/vglist/blob/7ff3d360e861a3e224565a7ad941228f5fd462e2/spec/factories/applications.rb | spec/factories/applications.rb | FactoryBot.define do
factory :application, class: 'Doorkeeper::Application' do
name { Faker::Lorem.words(number: 3).join(' ') }
confidential { false }
owner_type { 'User' }
association :owner, factory: :user
redirect_uri { 'https://example.com/' }
scopes { 'read write' }
end
end
| ruby | MIT | 7ff3d360e861a3e224565a7ad941228f5fd462e2 | 2026-01-04T17:32:52.765079Z | false |
connorshea/vglist | https://github.com/connorshea/vglist/blob/7ff3d360e861a3e224565a7ad941228f5fd462e2/spec/factories/relationship.rb | spec/factories/relationship.rb | FactoryBot.define do
factory :relationship do
association :follower, factory: :user
association :followed, factory: :user
end
end
| ruby | MIT | 7ff3d360e861a3e224565a7ad941228f5fd462e2 | 2026-01-04T17:32:52.765079Z | false |
connorshea/vglist | https://github.com/connorshea/vglist/blob/7ff3d360e861a3e224565a7ad941228f5fd462e2/spec/factories/stores.rb | spec/factories/stores.rb | FactoryBot.define do
factory :store do
name { Faker::Game.store }
end
end
| ruby | MIT | 7ff3d360e861a3e224565a7ad941228f5fd462e2 | 2026-01-04T17:32:52.765079Z | false |
connorshea/vglist | https://github.com/connorshea/vglist/blob/7ff3d360e861a3e224565a7ad941228f5fd462e2/spec/factories/statistics.rb | spec/factories/statistics.rb | FactoryBot.define do
factory :statistic do
users { rand(100_000) }
games { rand(100_000) }
platforms { rand(100_000) }
series { rand(100_000) }
engines { rand(100_000) }
companies { rand(100_000) }
genres { rand(100_000) }
stores { rand(100_000) }
events { rand(100_000) }
game_... | ruby | MIT | 7ff3d360e861a3e224565a7ad941228f5fd462e2 | 2026-01-04T17:32:52.765079Z | false |
connorshea/vglist | https://github.com/connorshea/vglist/blob/7ff3d360e861a3e224565a7ad941228f5fd462e2/spec/factories/game_platforms.rb | spec/factories/game_platforms.rb | FactoryBot.define do
factory :game_platform do
game
platform
end
end
| ruby | MIT | 7ff3d360e861a3e224565a7ad941228f5fd462e2 | 2026-01-04T17:32:52.765079Z | false |
connorshea/vglist | https://github.com/connorshea/vglist/blob/7ff3d360e861a3e224565a7ad941228f5fd462e2/spec/factories/game_purchase_stores.rb | spec/factories/game_purchase_stores.rb | FactoryBot.define do
factory :game_purchase_store do
game_purchase
store
end
end
| ruby | MIT | 7ff3d360e861a3e224565a7ad941228f5fd462e2 | 2026-01-04T17:32:52.765079Z | false |
connorshea/vglist | https://github.com/connorshea/vglist/blob/7ff3d360e861a3e224565a7ad941228f5fd462e2/spec/factories/steam_blocklist.rb | spec/factories/steam_blocklist.rb | FactoryBot.define do
factory :steam_blocklist do
steam_app_id { rand(0..100_000) }
name { Faker::Game.unique.title }
user
end
end
| ruby | MIT | 7ff3d360e861a3e224565a7ad941228f5fd462e2 | 2026-01-04T17:32:52.765079Z | false |
connorshea/vglist | https://github.com/connorshea/vglist/blob/7ff3d360e861a3e224565a7ad941228f5fd462e2/spec/factories/game_developers.rb | spec/factories/game_developers.rb | FactoryBot.define do
factory :game_developer do
game
company
end
end
| ruby | MIT | 7ff3d360e861a3e224565a7ad941228f5fd462e2 | 2026-01-04T17:32:52.765079Z | false |
connorshea/vglist | https://github.com/connorshea/vglist/blob/7ff3d360e861a3e224565a7ad941228f5fd462e2/spec/factories/access_tokens.rb | spec/factories/access_tokens.rb | FactoryBot.define do
factory :access_token, class: 'Doorkeeper::AccessToken' do
application
expires_in { 2.hours }
scopes { 'read write' }
# Bit of a hack to make the resource_owner relationship work.
transient do
resource_owner { create :user }
end
resource_owner_id { resource_owne... | ruby | MIT | 7ff3d360e861a3e224565a7ad941228f5fd462e2 | 2026-01-04T17:32:52.765079Z | false |
connorshea/vglist | https://github.com/connorshea/vglist/blob/7ff3d360e861a3e224565a7ad941228f5fd462e2/spec/factories/games.rb | spec/factories/games.rb | FactoryBot.define do
factory :game do
name { "Half-Life 2" }
trait :cover do
after(:build) do |game|
game.cover.attach(io: File.open(Rails.root.join('spec/factories/images/crysis.jpg')), filename: 'crysis.jpg', content_type: 'image/jpeg')
end
end
trait :series do
series
... | ruby | MIT | 7ff3d360e861a3e224565a7ad941228f5fd462e2 | 2026-01-04T17:32:52.765079Z | false |
connorshea/vglist | https://github.com/connorshea/vglist/blob/7ff3d360e861a3e224565a7ad941228f5fd462e2/spec/factories/external_accounts.rb | spec/factories/external_accounts.rb | FactoryBot.define do
factory :external_account do
user
account_type { :steam }
steam_id { rand(0..10_000_000_000) }
steam_profile_url { 'https://steamcommunity.com/id/username/' }
end
end
| ruby | MIT | 7ff3d360e861a3e224565a7ad941228f5fd462e2 | 2026-01-04T17:32:52.765079Z | false |
connorshea/vglist | https://github.com/connorshea/vglist/blob/7ff3d360e861a3e224565a7ad941228f5fd462e2/spec/factories/unmatched_games.rb | spec/factories/unmatched_games.rb | FactoryBot.define do
factory :unmatched_game do
association :user
external_service_id { Faker::Number.unique.number(digits: 6).to_s }
external_service_name { 'Steam' }
name { Faker::Game.title }
end
end
| ruby | MIT | 7ff3d360e861a3e224565a7ad941228f5fd462e2 | 2026-01-04T17:32:52.765079Z | false |
connorshea/vglist | https://github.com/connorshea/vglist/blob/7ff3d360e861a3e224565a7ad941228f5fd462e2/spec/factories/platforms.rb | spec/factories/platforms.rb | FactoryBot.define do
factory :platform do
name { "Xbox 360" }
wikidata_id { Faker::Number.number(digits: 6) }
trait :game do
after(:create) { |platform| create(:game_platform, platform: platform) }
end
factory :platform_with_everything, traits: [:game]
end
end
| ruby | MIT | 7ff3d360e861a3e224565a7ad941228f5fd462e2 | 2026-01-04T17:32:52.765079Z | false |
connorshea/vglist | https://github.com/connorshea/vglist/blob/7ff3d360e861a3e224565a7ad941228f5fd462e2/spec/factories/engines.rb | spec/factories/engines.rb | FactoryBot.define do
factory :engine do
name { "Source Engine" }
wikidata_id { Faker::Number.number(digits: 6) }
trait :game do
after(:create) { |engine| create(:game_engine, engine: engine) }
end
factory :engine_with_everything, traits: [:game]
end
end
| ruby | MIT | 7ff3d360e861a3e224565a7ad941228f5fd462e2 | 2026-01-04T17:32:52.765079Z | false |
connorshea/vglist | https://github.com/connorshea/vglist/blob/7ff3d360e861a3e224565a7ad941228f5fd462e2/spec/factories/series.rb | spec/factories/series.rb | FactoryBot.define do
factory :series do
name { "Half-Life" }
wikidata_id { Faker::Number.number(digits: 6) }
trait :game do
after(:create) { |series| create(:game, series: series) }
end
factory :series_with_everything, traits: [:game]
end
end
| ruby | MIT | 7ff3d360e861a3e224565a7ad941228f5fd462e2 | 2026-01-04T17:32:52.765079Z | false |
connorshea/vglist | https://github.com/connorshea/vglist/blob/7ff3d360e861a3e224565a7ad941228f5fd462e2/spec/factories/favorite_games.rb | spec/factories/favorite_games.rb | FactoryBot.define do
factory :favorite_game do
user
game
end
end
| ruby | MIT | 7ff3d360e861a3e224565a7ad941228f5fd462e2 | 2026-01-04T17:32:52.765079Z | false |
connorshea/vglist | https://github.com/connorshea/vglist/blob/7ff3d360e861a3e224565a7ad941228f5fd462e2/spec/factories/game_publishers.rb | spec/factories/game_publishers.rb | FactoryBot.define do
factory :game_publisher do
game
company
end
end
| ruby | MIT | 7ff3d360e861a3e224565a7ad941228f5fd462e2 | 2026-01-04T17:32:52.765079Z | false |
connorshea/vglist | https://github.com/connorshea/vglist/blob/7ff3d360e861a3e224565a7ad941228f5fd462e2/spec/factories/game_genres.rb | spec/factories/game_genres.rb | FactoryBot.define do
factory :game_genre do
game
genre
end
end
| ruby | MIT | 7ff3d360e861a3e224565a7ad941228f5fd462e2 | 2026-01-04T17:32:52.765079Z | false |
connorshea/vglist | https://github.com/connorshea/vglist/blob/7ff3d360e861a3e224565a7ad941228f5fd462e2/spec/factories/genres.rb | spec/factories/genres.rb | FactoryBot.define do
factory :genre do
name { "First-person shooter" }
wikidata_id { Faker::Number.number(digits: 6) }
trait :game do
after(:create) { |genre| create(:game_genre, genre: genre) }
end
factory :genre_with_everything, traits: [:game]
end
end
| ruby | MIT | 7ff3d360e861a3e224565a7ad941228f5fd462e2 | 2026-01-04T17:32:52.765079Z | false |
connorshea/vglist | https://github.com/connorshea/vglist/blob/7ff3d360e861a3e224565a7ad941228f5fd462e2/spec/factories/steam_app_ids.rb | spec/factories/steam_app_ids.rb | FactoryBot.define do
factory :steam_app_id do
game
app_id { Faker::Number.unique.number(digits: 6) }
end
end
| ruby | MIT | 7ff3d360e861a3e224565a7ad941228f5fd462e2 | 2026-01-04T17:32:52.765079Z | false |
connorshea/vglist | https://github.com/connorshea/vglist/blob/7ff3d360e861a3e224565a7ad941228f5fd462e2/spec/models/game_publisher_spec.rb | spec/models/game_publisher_spec.rb | require 'rails_helper'
RSpec.describe GamePublisher, type: :model do
subject(:game_publisher) { build(:game_publisher) }
describe "Validations" do
it "is valid with valid attributes" do
expect(game_publisher).to be_valid
end
it { should validate_uniqueness_of(:game_id).scoped_to(:company_id) }
... | ruby | MIT | 7ff3d360e861a3e224565a7ad941228f5fd462e2 | 2026-01-04T17:32:52.765079Z | false |
connorshea/vglist | https://github.com/connorshea/vglist/blob/7ff3d360e861a3e224565a7ad941228f5fd462e2/spec/models/unmatched_game_spec.rb | spec/models/unmatched_game_spec.rb | require 'rails_helper'
RSpec.describe UnmatchedGame, type: :model do
subject(:unmatched_game) { build(:unmatched_game) }
describe "Validations" do
it "is valid with valid attributes" do
expect(unmatched_game).to be_valid
end
it { should validate_presence_of(:name) }
it { should validate_len... | ruby | MIT | 7ff3d360e861a3e224565a7ad941228f5fd462e2 | 2026-01-04T17:32:52.765079Z | false |
connorshea/vglist | https://github.com/connorshea/vglist/blob/7ff3d360e861a3e224565a7ad941228f5fd462e2/spec/models/relationship_spec.rb | spec/models/relationship_spec.rb | require 'rails_helper'
RSpec.describe Relationship, type: :model do
subject(:relationship) { build(:relationship) }
describe "Validations" do
it "is valid with valid attributes" do
expect(relationship).to be_valid
end
it { should validate_presence_of(:follower_id) }
it { should validate_pre... | ruby | MIT | 7ff3d360e861a3e224565a7ad941228f5fd462e2 | 2026-01-04T17:32:52.765079Z | false |
connorshea/vglist | https://github.com/connorshea/vglist/blob/7ff3d360e861a3e224565a7ad941228f5fd462e2/spec/models/external_account_spec.rb | spec/models/external_account_spec.rb | require 'rails_helper'
RSpec.describe ExternalAccount, type: :model do
subject(:external_account) { build(:external_account) }
describe "Validations" do
it "is valid with valid attributes" do
expect(external_account).to be_valid
end
it 'validates uniqueness' do
expect(external_account).to... | ruby | MIT | 7ff3d360e861a3e224565a7ad941228f5fd462e2 | 2026-01-04T17:32:52.765079Z | false |
connorshea/vglist | https://github.com/connorshea/vglist/blob/7ff3d360e861a3e224565a7ad941228f5fd462e2/spec/models/series_spec.rb | spec/models/series_spec.rb | require 'rails_helper'
RSpec.describe Series, type: :model do
subject(:series) { build(:series) }
describe "Validations" do
it "is valid with valid attributes" do
expect(series).to be_valid
end
it { should validate_presence_of(:name) }
it { should validate_length_of(:name).is_at_most(120) ... | ruby | MIT | 7ff3d360e861a3e224565a7ad941228f5fd462e2 | 2026-01-04T17:32:52.765079Z | false |
connorshea/vglist | https://github.com/connorshea/vglist/blob/7ff3d360e861a3e224565a7ad941228f5fd462e2/spec/models/genre_spec.rb | spec/models/genre_spec.rb | require 'rails_helper'
RSpec.describe Genre, type: :model do
subject(:genre) { build(:genre) }
describe "Validations" do
it "is valid with valid attributes" do
expect(genre).to be_valid
end
it { should validate_presence_of(:name) }
it { should validate_length_of(:name).is_at_most(120) }
... | ruby | MIT | 7ff3d360e861a3e224565a7ad941228f5fd462e2 | 2026-01-04T17:32:52.765079Z | false |
connorshea/vglist | https://github.com/connorshea/vglist/blob/7ff3d360e861a3e224565a7ad941228f5fd462e2/spec/models/wikidata_blocklist_spec.rb | spec/models/wikidata_blocklist_spec.rb | require 'rails_helper'
RSpec.describe WikidataBlocklist, type: :model do
subject(:wikidata_blocklist) { build(:wikidata_blocklist) }
describe "Validations" do
it "is valid with valid attributes" do
expect(wikidata_blocklist).to be_valid
end
it { should validate_presence_of(:wikidata_id) }
i... | ruby | MIT | 7ff3d360e861a3e224565a7ad941228f5fd462e2 | 2026-01-04T17:32:52.765079Z | false |
connorshea/vglist | https://github.com/connorshea/vglist/blob/7ff3d360e861a3e224565a7ad941228f5fd462e2/spec/models/game_purchase_platform_spec.rb | spec/models/game_purchase_platform_spec.rb | require 'rails_helper'
RSpec.describe GamePurchasePlatform, type: :model do
subject(:game_purchase_platform) { build(:game_purchase_platform) }
describe "Validations" do
it "is valid with valid attributes" do
expect(game_purchase_platform).to be_valid
end
it { should validate_uniqueness_of(:gam... | ruby | MIT | 7ff3d360e861a3e224565a7ad941228f5fd462e2 | 2026-01-04T17:32:52.765079Z | false |
connorshea/vglist | https://github.com/connorshea/vglist/blob/7ff3d360e861a3e224565a7ad941228f5fd462e2/spec/models/favorite_game_spec.rb | spec/models/favorite_game_spec.rb | require 'rails_helper'
RSpec.describe FavoriteGame, type: :model do
subject(:favorite_game) { build(:favorite_game) }
describe "Validations" do
it "is valid with valid attributes" do
expect(favorite_game).to be_valid
end
it 'validates uniqueness' do
expect(favorite_game).to validate_uniqu... | ruby | MIT | 7ff3d360e861a3e224565a7ad941228f5fd462e2 | 2026-01-04T17:32:52.765079Z | false |
connorshea/vglist | https://github.com/connorshea/vglist/blob/7ff3d360e861a3e224565a7ad941228f5fd462e2/spec/models/store_spec.rb | spec/models/store_spec.rb | require 'rails_helper'
RSpec.describe Store, type: :model do
subject(:store) { build(:store) }
describe "Validations" do
it "is valid with valid attributes" do
expect(store).to be_valid
end
it { should validate_presence_of(:name) }
it { should validate_length_of(:name).is_at_most(120) }
... | ruby | MIT | 7ff3d360e861a3e224565a7ad941228f5fd462e2 | 2026-01-04T17:32:52.765079Z | false |
connorshea/vglist | https://github.com/connorshea/vglist/blob/7ff3d360e861a3e224565a7ad941228f5fd462e2/spec/models/game_platform_spec.rb | spec/models/game_platform_spec.rb | require 'rails_helper'
RSpec.describe GamePlatform, type: :model do
subject(:game_platform) { build(:game_platform) }
describe "Validations" do
it "is valid with valid attributes" do
expect(game_platform).to be_valid
end
it { should validate_uniqueness_of(:game_id).scoped_to(:platform_id) }
e... | ruby | MIT | 7ff3d360e861a3e224565a7ad941228f5fd462e2 | 2026-01-04T17:32:52.765079Z | false |
connorshea/vglist | https://github.com/connorshea/vglist/blob/7ff3d360e861a3e224565a7ad941228f5fd462e2/spec/models/game_spec.rb | spec/models/game_spec.rb | require 'rails_helper'
RSpec.describe Game, type: :model do
subject(:game) { build(:game) }
describe "Validations" do
it "is valid with valid attributes" do
expect(game).to be_valid
end
it { should validate_presence_of(:name) }
it { should validate_length_of(:name).is_at_most(120) }
i... | ruby | MIT | 7ff3d360e861a3e224565a7ad941228f5fd462e2 | 2026-01-04T17:32:52.765079Z | false |
connorshea/vglist | https://github.com/connorshea/vglist/blob/7ff3d360e861a3e224565a7ad941228f5fd462e2/spec/models/company_spec.rb | spec/models/company_spec.rb | require 'rails_helper'
RSpec.describe Company, type: :model do
subject(:company) { build(:company) }
describe "Validations" do
it "is valid with valid attributes" do
expect(company).to be_valid
end
it { should validate_presence_of(:name) }
it { should validate_length_of(:name).is_at_most(1... | ruby | MIT | 7ff3d360e861a3e224565a7ad941228f5fd462e2 | 2026-01-04T17:32:52.765079Z | false |
connorshea/vglist | https://github.com/connorshea/vglist/blob/7ff3d360e861a3e224565a7ad941228f5fd462e2/spec/models/game_purchase_store_spec.rb | spec/models/game_purchase_store_spec.rb | require 'rails_helper'
RSpec.describe GamePurchaseStore, type: :model do
subject(:game_purchase_store) { build(:game_purchase_store) }
describe "Validations" do
it "is valid with valid attributes" do
expect(game_purchase_store).to be_valid
end
it { should validate_uniqueness_of(:game_purchase_i... | ruby | MIT | 7ff3d360e861a3e224565a7ad941228f5fd462e2 | 2026-01-04T17:32:52.765079Z | false |
connorshea/vglist | https://github.com/connorshea/vglist/blob/7ff3d360e861a3e224565a7ad941228f5fd462e2/spec/models/steam_blocklist_spec.rb | spec/models/steam_blocklist_spec.rb | require 'rails_helper'
RSpec.describe SteamBlocklist, type: :model do
subject(:steam_blocklist) { build(:steam_blocklist) }
describe "Validations" do
it "is valid with valid attributes" do
expect(steam_blocklist).to be_valid
end
it { should validate_presence_of(:steam_app_id) }
it { should ... | ruby | MIT | 7ff3d360e861a3e224565a7ad941228f5fd462e2 | 2026-01-04T17:32:52.765079Z | false |
connorshea/vglist | https://github.com/connorshea/vglist/blob/7ff3d360e861a3e224565a7ad941228f5fd462e2/spec/models/game_engine_spec.rb | spec/models/game_engine_spec.rb | require 'rails_helper'
RSpec.describe GameEngine, type: :model do
subject(:game_engine) { build(:game_engine) }
describe "Validations" do
it "is valid with valid attributes" do
expect(game_engine).to be_valid
end
it { should validate_uniqueness_of(:game_id).scoped_to(:engine_id) }
end
desc... | ruby | MIT | 7ff3d360e861a3e224565a7ad941228f5fd462e2 | 2026-01-04T17:32:52.765079Z | false |
connorshea/vglist | https://github.com/connorshea/vglist/blob/7ff3d360e861a3e224565a7ad941228f5fd462e2/spec/models/statistic_spec.rb | spec/models/statistic_spec.rb | require 'rails_helper'
RSpec.describe Statistic, type: :model do
subject(:statistic) { build(:statistic) }
describe "Validations" do
it "is valid with valid attributes" do
expect(statistic).to be_valid
end
[
:users,
:games,
:platforms,
:series,
:engines,
:com... | ruby | MIT | 7ff3d360e861a3e224565a7ad941228f5fd462e2 | 2026-01-04T17:32:52.765079Z | false |
connorshea/vglist | https://github.com/connorshea/vglist/blob/7ff3d360e861a3e224565a7ad941228f5fd462e2/spec/models/game_purchase_spec.rb | spec/models/game_purchase_spec.rb | require 'rails_helper'
RSpec.describe GamePurchase, type: :model do
subject(:game_purchase) { build(:game_purchase) }
describe "Validations" do
it "is valid with valid attributes" do
expect(game_purchase).to be_valid
end
it { should validate_length_of(:comments).is_at_most(2000) }
it 'vali... | ruby | MIT | 7ff3d360e861a3e224565a7ad941228f5fd462e2 | 2026-01-04T17:32:52.765079Z | false |
connorshea/vglist | https://github.com/connorshea/vglist/blob/7ff3d360e861a3e224565a7ad941228f5fd462e2/spec/models/game_developer_spec.rb | spec/models/game_developer_spec.rb | require 'rails_helper'
RSpec.describe GameDeveloper, type: :model do
subject(:game_developer) { build(:game_developer) }
describe "Validations" do
it "is valid with valid attributes" do
expect(game_developer).to be_valid
end
it { should validate_uniqueness_of(:game_id).scoped_to(:company_id) }
... | ruby | MIT | 7ff3d360e861a3e224565a7ad941228f5fd462e2 | 2026-01-04T17:32:52.765079Z | false |
connorshea/vglist | https://github.com/connorshea/vglist/blob/7ff3d360e861a3e224565a7ad941228f5fd462e2/spec/models/engine_spec.rb | spec/models/engine_spec.rb | require 'rails_helper'
RSpec.describe Engine, type: :model do
subject(:engine) { build(:engine) }
describe "Validations" do
it "is valid with valid attributes" do
expect(engine).to be_valid
end
it { should validate_presence_of(:name) }
it { should validate_length_of(:name).is_at_most(120) ... | ruby | MIT | 7ff3d360e861a3e224565a7ad941228f5fd462e2 | 2026-01-04T17:32:52.765079Z | false |
connorshea/vglist | https://github.com/connorshea/vglist/blob/7ff3d360e861a3e224565a7ad941228f5fd462e2/spec/models/user_spec.rb | spec/models/user_spec.rb | require 'rails_helper'
RSpec.describe User, type: :model do
subject(:user) { build(:user) }
describe "Validations" do
it "is valid with valid attributes" do
expect(user).to be_valid
end
# Validate length of username.
it do
expect(user).to validate_length_of(:username)
.is_at_l... | ruby | MIT | 7ff3d360e861a3e224565a7ad941228f5fd462e2 | 2026-01-04T17:32:52.765079Z | false |
connorshea/vglist | https://github.com/connorshea/vglist/blob/7ff3d360e861a3e224565a7ad941228f5fd462e2/spec/models/game_genre_spec.rb | spec/models/game_genre_spec.rb | require 'rails_helper'
RSpec.describe GameGenre, type: :model do
subject(:game_genre) { build(:game_genre) }
describe "Validations" do
it "is valid with valid attributes" do
expect(game_genre).to be_valid
end
it { should validate_uniqueness_of(:game_id).scoped_to(:genre_id) }
end
describe ... | ruby | MIT | 7ff3d360e861a3e224565a7ad941228f5fd462e2 | 2026-01-04T17:32:52.765079Z | false |
connorshea/vglist | https://github.com/connorshea/vglist/blob/7ff3d360e861a3e224565a7ad941228f5fd462e2/spec/models/steam_app_id_spec.rb | spec/models/steam_app_id_spec.rb | require 'rails_helper'
RSpec.describe SteamAppId, type: :model do
subject(:steam_app_id) { build(:steam_app_id) }
describe "Validations" do
it "is valid with valid attributes" do
expect(steam_app_id).to be_valid
end
it { should validate_uniqueness_of(:app_id) }
it 'validates numericality of... | ruby | MIT | 7ff3d360e861a3e224565a7ad941228f5fd462e2 | 2026-01-04T17:32:52.765079Z | false |
connorshea/vglist | https://github.com/connorshea/vglist/blob/7ff3d360e861a3e224565a7ad941228f5fd462e2/spec/models/platform_spec.rb | spec/models/platform_spec.rb | require 'rails_helper'
RSpec.describe Platform, type: :model do
subject(:platform) { build(:platform) }
describe "Validations" do
it "is valid with valid attributes" do
expect(platform).to be_valid
end
it { should validate_presence_of(:name) }
it { should validate_length_of(:name).is_at_mo... | ruby | MIT | 7ff3d360e861a3e224565a7ad941228f5fd462e2 | 2026-01-04T17:32:52.765079Z | false |
connorshea/vglist | https://github.com/connorshea/vglist/blob/7ff3d360e861a3e224565a7ad941228f5fd462e2/spec/models/views/new_event_spec.rb | spec/models/views/new_event_spec.rb | require 'rails_helper'
RSpec.describe Views::NewEvent, type: :model do
subject(:event) { create(:event) }
describe "Validations" do
it "is valid with valid attributes" do
expect(event).to be_valid
end
it { should validate_presence_of(:event_category) }
it 'has an event category enum' do
... | ruby | MIT | 7ff3d360e861a3e224565a7ad941228f5fd462e2 | 2026-01-04T17:32:52.765079Z | false |
connorshea/vglist | https://github.com/connorshea/vglist/blob/7ff3d360e861a3e224565a7ad941228f5fd462e2/spec/features/genres_spec.rb | spec/features/genres_spec.rb | require 'rails_helper'
RSpec.describe "Genres", type: :feature do
describe "genres index" do
let!(:genre) { create(:genre) }
let(:user) { create(:confirmed_user) }
let(:moderator) { create(:confirmed_moderator) }
it "with no user" do
visit(genres_path)
expect(page).to have_link(href: gen... | ruby | MIT | 7ff3d360e861a3e224565a7ad941228f5fd462e2 | 2026-01-04T17:32:52.765079Z | false |
connorshea/vglist | https://github.com/connorshea/vglist/blob/7ff3d360e861a3e224565a7ad941228f5fd462e2/spec/features/engines_spec.rb | spec/features/engines_spec.rb | require 'rails_helper'
RSpec.describe "Engines", type: :feature do
describe "engines index" do
let!(:engine) { create(:engine) }
let(:user) { create(:confirmed_user) }
let(:moderator) { create(:confirmed_moderator) }
it "with no user" do
visit(engines_path)
expect(page).to have_link(href... | ruby | MIT | 7ff3d360e861a3e224565a7ad941228f5fd462e2 | 2026-01-04T17:32:52.765079Z | false |
connorshea/vglist | https://github.com/connorshea/vglist/blob/7ff3d360e861a3e224565a7ad941228f5fd462e2/spec/features/series_spec.rb | spec/features/series_spec.rb | require 'rails_helper'
RSpec.describe "Series", type: :feature do
describe "series index" do
let!(:series) { create(:series) }
let(:user) { create(:confirmed_user) }
let(:moderator) { create(:confirmed_moderator) }
it "with no user" do
visit(series_index_path)
expect(page).to have_link(h... | ruby | MIT | 7ff3d360e861a3e224565a7ad941228f5fd462e2 | 2026-01-04T17:32:52.765079Z | false |
connorshea/vglist | https://github.com/connorshea/vglist/blob/7ff3d360e861a3e224565a7ad941228f5fd462e2/spec/features/companies_spec.rb | spec/features/companies_spec.rb | require 'rails_helper'
RSpec.describe "Companies", type: :feature do
describe "companies index" do
let!(:company) { create(:company) }
let(:user) { create(:confirmed_user) }
let(:moderator) { create(:confirmed_moderator) }
it "with no user" do
visit(companies_path)
expect(page).to have_l... | ruby | MIT | 7ff3d360e861a3e224565a7ad941228f5fd462e2 | 2026-01-04T17:32:52.765079Z | false |
connorshea/vglist | https://github.com/connorshea/vglist/blob/7ff3d360e861a3e224565a7ad941228f5fd462e2/spec/features/platforms_spec.rb | spec/features/platforms_spec.rb | require 'rails_helper'
RSpec.describe "Platforms", type: :feature do
describe "platforms index" do
let!(:platform) { create(:platform) }
let(:user) { create(:confirmed_user) }
let(:moderator) { create(:confirmed_moderator) }
it "with no user" do
visit(platforms_path)
expect(page).to have... | ruby | MIT | 7ff3d360e861a3e224565a7ad941228f5fd462e2 | 2026-01-04T17:32:52.765079Z | false |
connorshea/vglist | https://github.com/connorshea/vglist/blob/7ff3d360e861a3e224565a7ad941228f5fd462e2/spec/features/users_spec.rb | spec/features/users_spec.rb | require 'rails_helper'
RSpec.describe "Users", type: :feature do
describe "User page" do
let!(:game) { create(:game) }
let(:user) { create(:confirmed_user) }
let(:platform) { create(:platform) }
it "user adds game to library", js: true do
sign_in(user)
visit(user_path(user))
click... | ruby | MIT | 7ff3d360e861a3e224565a7ad941228f5fd462e2 | 2026-01-04T17:32:52.765079Z | false |
connorshea/vglist | https://github.com/connorshea/vglist/blob/7ff3d360e861a3e224565a7ad941228f5fd462e2/spec/features/settings_spec.rb | spec/features/settings_spec.rb | require 'rails_helper'
RSpec.describe "Settings", type: :feature do
describe "profile settings" do
let(:user) { create(:confirmed_user) }
it "with user" do
sign_in(user)
visit(settings_path)
within(".bio-form") do
fill_in('user[bio]', with: 'New bio!')
end
click_button... | ruby | MIT | 7ff3d360e861a3e224565a7ad941228f5fd462e2 | 2026-01-04T17:32:52.765079Z | false |
connorshea/vglist | https://github.com/connorshea/vglist/blob/7ff3d360e861a3e224565a7ad941228f5fd462e2/spec/features/games_spec.rb | spec/features/games_spec.rb | require 'rails_helper'
RSpec.describe "Games", type: :feature do
describe "games index" do
let!(:game) { create(:game) }
let(:user) { create(:confirmed_user) }
let(:moderator) { create(:confirmed_moderator) }
it "with no user" do
visit(games_path)
expect(page).to have_link(href: game_pat... | ruby | MIT | 7ff3d360e861a3e224565a7ad941228f5fd462e2 | 2026-01-04T17:32:52.765079Z | false |
connorshea/vglist | https://github.com/connorshea/vglist/blob/7ff3d360e861a3e224565a7ad941228f5fd462e2/spec/mailers/application_mailer_spec.rb | spec/mailers/application_mailer_spec.rb | require "rails_helper"
RSpec.describe ApplicationMailer, type: :mailer do
describe 'default email from' do
subject { described_class.default[:from] }
it { should eq('noreply@mail.vglist.co') }
end
end
| ruby | MIT | 7ff3d360e861a3e224565a7ad941228f5fd462e2 | 2026-01-04T17:32:52.765079Z | false |
connorshea/vglist | https://github.com/connorshea/vglist/blob/7ff3d360e861a3e224565a7ad941228f5fd462e2/lib/wikidata_helper.rb | lib/wikidata_helper.rb | class WikidataHelper
require "addressable/template"
require "open-uri"
require "json"
# Make an API call.
#
# @param [String] action The action to perform, see https://www.wikidata.org/w/api.php?action=help&modules=main
# @param [String] ids Wikidata IDs, e.g. 'Q123' or 'P123'
# @param [String] props P... | ruby | MIT | 7ff3d360e861a3e224565a7ad941228f5fd462e2 | 2026-01-04T17:32:52.765079Z | false |
connorshea/vglist | https://github.com/connorshea/vglist/blob/7ff3d360e861a3e224565a7ad941228f5fd462e2/config/application.rb | config/application.rb | require_relative 'boot'
require "rails"
# Pick the frameworks you want:
require "active_model/railtie"
require "active_job/railtie"
require "active_record/railtie"
require "active_storage/engine"
require "action_controller/railtie"
require "action_mailer/railtie"
# require "action_mailbox/engine"
# require "action_tex... | ruby | MIT | 7ff3d360e861a3e224565a7ad941228f5fd462e2 | 2026-01-04T17:32:52.765079Z | false |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.