BigW Consortium Gitlab
Skip to content
Projects
Groups
Snippets
Help
This project
Loading...
Sign in / Register
Toggle navigation
G
gitlab-ce
Project
Overview
Details
Activity
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
0
Issues
0
List
Board
Labels
Milestones
Merge Requests
0
Merge Requests
0
Registry
Registry
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Commits
Issue Boards
Open sidebar
Forest Godfrey
gitlab-ce
Commits
45378bdd
Commit
45378bdd
authored
Feb 20, 2017
by
Gabriel Mazetto
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Added specs for BaseExecutor
parent
bc6d131b
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
51 additions
and
0 deletions
+51
-0
base_executor_spec.rb
spec/lib/system_check/base_executor_spec.rb
+51
-0
No files found.
spec/lib/system_check/base_executor_spec.rb
0 → 100644
View file @
45378bdd
require
'spec_helper'
describe
SystemCheck
::
BaseExecutor
,
lib:
true
do
class
SimpleCheck
<
SystemCheck
::
BaseCheck
def
check?
true
end
end
class
OtherCheck
<
SystemCheck
::
BaseCheck
def
check?
false
end
end
subject
{
described_class
.
new
(
'Test'
)
}
describe
'#component'
do
it
'returns stored component name'
do
expect
(
subject
.
component
).
to
eq
(
'Test'
)
end
end
describe
'#checks'
do
before
do
subject
<<
SimpleCheck
end
it
'returns an array of classes'
do
expect
(
subject
.
checks
).
to
include
(
SimpleCheck
)
end
end
describe
'#<<'
do
before
do
subject
<<
SimpleCheck
end
it
'appends a new check to the Set'
do
subject
<<
OtherCheck
stored_checks
=
subject
.
checks
.
to_a
expect
(
stored_checks
.
first
).
to
eq
(
SimpleCheck
)
expect
(
stored_checks
.
last
).
to
eq
(
OtherCheck
)
end
it
'inserts unique itens only'
do
subject
<<
SimpleCheck
expect
(
subject
.
checks
.
size
).
to
eq
(
1
)
end
end
end
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