BigW Consortium Gitlab

Commit 6a4dd051 by Grzegorz Bizon

Optimize a few simple spec files by using `set`

parent 937db37d
require 'rails_helper'
RSpec.describe AbuseReport do
subject { create(:abuse_report) }
let(:user) { create(:admin) }
describe AbuseReport do
set(:report) { create(:abuse_report) }
set(:user) { create(:admin) }
subject { report }
it { expect(subject).to be_valid }
......
require 'rails_helper'
RSpec.describe Appearance do
describe Appearance do
subject { build(:appearance) }
it { is_expected.to be_valid }
......
require 'spec_helper'
describe ChatName do
subject { create(:chat_name) }
set(:chat_name) { create(:chat_name) }
subject { chat_name }
it { is_expected.to belong_to(:service) }
it { is_expected.to belong_to(:user) }
......
require 'spec_helper'
describe ChatTeam do
subject { create(:chat_team) }
set(:chat_team) { create(:chat_team) }
subject { chat_team }
# Associations
it { is_expected.to belong_to(:namespace) }
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment