Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Support
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
G
gitlab-ce
Project overview
Project overview
Details
Activity
Releases
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Issues
0
Issues
0
List
Boards
Labels
Milestones
Merge Requests
1
Merge Requests
1
Analytics
Analytics
Repository
Value Stream
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Create a new issue
Commits
Issue Boards
Open sidebar
nexedi
gitlab-ce
Commits
6a4dd051
Commit
6a4dd051
authored
Sep 05, 2017
by
Grzegorz Bizon
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Optimize a few simple spec files by using `set`
parent
937db37d
Changes
4
Show whitespace changes
Inline
Side-by-side
Showing
4 changed files
with
9 additions
and
6 deletions
+9
-6
spec/models/abuse_report_spec.rb
spec/models/abuse_report_spec.rb
+4
-3
spec/models/appearance_spec.rb
spec/models/appearance_spec.rb
+1
-1
spec/models/chat_name_spec.rb
spec/models/chat_name_spec.rb
+2
-1
spec/models/chat_team_spec.rb
spec/models/chat_team_spec.rb
+2
-1
No files found.
spec/models/abuse_report_spec.rb
View file @
6a4dd051
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
}
...
...
spec/models/appearance_spec.rb
View file @
6a4dd051
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
}
...
...
spec/models/chat_name_spec.rb
View file @
6a4dd051
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
)
}
...
...
spec/models/chat_team_spec.rb
View file @
6a4dd051
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
)
}
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment