Optimize a few simple spec files by using set
This commit is contained in:
parent
937db37dda
commit
6a4dd05190
4 changed files with 9 additions and 6 deletions
|
@ -1,8 +1,9 @@
|
||||||
require 'rails_helper'
|
require 'rails_helper'
|
||||||
|
|
||||||
RSpec.describe AbuseReport do
|
describe AbuseReport do
|
||||||
subject { create(:abuse_report) }
|
set(:report) { create(:abuse_report) }
|
||||||
let(:user) { create(:admin) }
|
set(:user) { create(:admin) }
|
||||||
|
subject { report }
|
||||||
|
|
||||||
it { expect(subject).to be_valid }
|
it { expect(subject).to be_valid }
|
||||||
|
|
||||||
|
|
|
@ -1,6 +1,6 @@
|
||||||
require 'rails_helper'
|
require 'rails_helper'
|
||||||
|
|
||||||
RSpec.describe Appearance do
|
describe Appearance do
|
||||||
subject { build(:appearance) }
|
subject { build(:appearance) }
|
||||||
|
|
||||||
it { is_expected.to be_valid }
|
it { is_expected.to be_valid }
|
||||||
|
|
|
@ -1,7 +1,8 @@
|
||||||
require 'spec_helper'
|
require 'spec_helper'
|
||||||
|
|
||||||
describe ChatName do
|
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(:service) }
|
||||||
it { is_expected.to belong_to(:user) }
|
it { is_expected.to belong_to(:user) }
|
||||||
|
|
|
@ -1,7 +1,8 @@
|
||||||
require 'spec_helper'
|
require 'spec_helper'
|
||||||
|
|
||||||
describe ChatTeam do
|
describe ChatTeam do
|
||||||
subject { create(:chat_team) }
|
set(:chat_team) { create(:chat_team) }
|
||||||
|
subject { chat_team }
|
||||||
|
|
||||||
# Associations
|
# Associations
|
||||||
it { is_expected.to belong_to(:namespace) }
|
it { is_expected.to belong_to(:namespace) }
|
||||||
|
|
Loading…
Reference in a new issue