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
02494f7c
Commit
02494f7c
authored
Feb 22, 2017
by
Douwe Maan
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Fix specs
parent
8a4d68c5
Hide whitespace changes
Inline
Side-by-side
Showing
5 changed files
with
12 additions
and
11 deletions
+12
-11
metric_spec.rb
spec/lib/gitlab/metrics/metric_spec.rb
+1
-1
system_spec.rb
spec/lib/gitlab/metrics/system_spec.rb
+3
-3
transaction_spec.rb
spec/lib/gitlab/metrics/transaction_spec.rb
+2
-2
cache_markdown_field_spec.rb
spec/models/concerns/cache_markdown_field_spec.rb
+3
-2
repository_spec.rb
spec/models/repository_spec.rb
+3
-3
No files found.
spec/lib/gitlab/metrics/metric_spec.rb
View file @
02494f7c
...
@@ -62,7 +62,7 @@ describe Gitlab::Metrics::Metric do
...
@@ -62,7 +62,7 @@ describe Gitlab::Metrics::Metric do
end
end
it
'includes the timestamp'
do
it
'includes the timestamp'
do
expect
(
hash
[
:timestamp
]).
to
be_an
_instance_of
(
Integer
)
expect
(
hash
[
:timestamp
]).
to
be_an
(
Integer
)
end
end
end
end
end
end
...
...
spec/lib/gitlab/metrics/system_spec.rb
View file @
02494f7c
...
@@ -29,19 +29,19 @@ describe Gitlab::Metrics::System do
...
@@ -29,19 +29,19 @@ describe Gitlab::Metrics::System do
describe
'.cpu_time'
do
describe
'.cpu_time'
do
it
'returns a Fixnum'
do
it
'returns a Fixnum'
do
expect
(
described_class
.
cpu_time
).
to
be_an
_instance_of
(
Integer
)
expect
(
described_class
.
cpu_time
).
to
be_an
(
Integer
)
end
end
end
end
describe
'.real_time'
do
describe
'.real_time'
do
it
'returns a Fixnum'
do
it
'returns a Fixnum'
do
expect
(
described_class
.
real_time
).
to
be_an
_instance_of
(
Integer
)
expect
(
described_class
.
real_time
).
to
be_an
(
Integer
)
end
end
end
end
describe
'.monotonic_time'
do
describe
'.monotonic_time'
do
it
'returns a Fixnum'
do
it
'returns a Fixnum'
do
expect
(
described_class
.
monotonic_time
).
to
be_an
_instance_of
(
Integer
)
expect
(
described_class
.
monotonic_time
).
to
be_an
(
Integer
)
end
end
end
end
end
end
spec/lib/gitlab/metrics/transaction_spec.rb
View file @
02494f7c
...
@@ -134,7 +134,7 @@ describe Gitlab::Metrics::Transaction do
...
@@ -134,7 +134,7 @@ describe Gitlab::Metrics::Transaction do
series:
'rails_transactions'
,
series:
'rails_transactions'
,
tags:
{
action:
'Foo#bar'
},
tags:
{
action:
'Foo#bar'
},
values:
{
duration:
0.0
,
allocated_memory:
a_kind_of
(
Numeric
)
},
values:
{
duration:
0.0
,
allocated_memory:
a_kind_of
(
Numeric
)
},
timestamp:
a
n_instance
_of
(
Integer
)
timestamp:
a
_kind
_of
(
Integer
)
}
}
expect
(
Gitlab
::
Metrics
).
to
receive
(
:submit_metrics
).
expect
(
Gitlab
::
Metrics
).
to
receive
(
:submit_metrics
).
...
@@ -151,7 +151,7 @@ describe Gitlab::Metrics::Transaction do
...
@@ -151,7 +151,7 @@ describe Gitlab::Metrics::Transaction do
series:
'events'
,
series:
'events'
,
tags:
{
event: :meow
},
tags:
{
event: :meow
},
values:
{
count:
1
},
values:
{
count:
1
},
timestamp:
a
n_instance
_of
(
Integer
)
timestamp:
a
_kind
_of
(
Integer
)
}
}
expect
(
Gitlab
::
Metrics
).
to
receive
(
:submit_metrics
).
expect
(
Gitlab
::
Metrics
).
to
receive
(
:submit_metrics
).
...
...
spec/models/concerns/cache_markdown_field_spec.rb
View file @
02494f7c
require
'spec_helper'
require
'spec_helper'
describe
CacheMarkdownField
do
describe
CacheMarkdownField
do
CacheMarkdownField
::
CACHING_CLASSES
<<
"ThingWithMarkdownFields"
caching_classes
=
CacheMarkdownField
::
CACHING_CLASSES
CacheMarkdownField
::
CACHING_CLASSES
=
[
"ThingWithMarkdownFields"
].
freeze
# The minimum necessary ActiveModel to test this concern
# The minimum necessary ActiveModel to test this concern
class
ThingWithMarkdownFields
class
ThingWithMarkdownFields
...
@@ -54,7 +55,7 @@ describe CacheMarkdownField do
...
@@ -54,7 +55,7 @@ describe CacheMarkdownField do
end
end
end
end
CacheMarkdownField
::
CACHING_CLASSES
.
delete
(
"ThingWithMarkdownFields"
)
CacheMarkdownField
::
CACHING_CLASSES
=
caching_classes
def
thing_subclass
(
new_attr
)
def
thing_subclass
(
new_attr
)
Class
.
new
(
ThingWithMarkdownFields
)
{
add_attr
(
new_attr
)
}
Class
.
new
(
ThingWithMarkdownFields
)
{
add_attr
(
new_attr
)
}
...
...
spec/models/repository_spec.rb
View file @
02494f7c
...
@@ -1382,13 +1382,13 @@ describe Repository, models: true do
...
@@ -1382,13 +1382,13 @@ describe Repository, models: true do
describe
'#branch_count'
do
describe
'#branch_count'
do
it
'returns the number of branches'
do
it
'returns the number of branches'
do
expect
(
repository
.
branch_count
).
to
be_an
_instance_of
(
Integer
)
expect
(
repository
.
branch_count
).
to
be_an
(
Integer
)
end
end
end
end
describe
'#tag_count'
do
describe
'#tag_count'
do
it
'returns the number of tags'
do
it
'returns the number of tags'
do
expect
(
repository
.
tag_count
).
to
be_an
_instance_of
(
Integer
)
expect
(
repository
.
tag_count
).
to
be_an
(
Integer
)
end
end
end
end
...
@@ -1738,7 +1738,7 @@ describe Repository, models: true do
...
@@ -1738,7 +1738,7 @@ describe Repository, models: true do
context
'with an existing repository'
do
context
'with an existing repository'
do
it
'returns the commit count'
do
it
'returns the commit count'
do
expect
(
repository
.
commit_count
).
to
be_an
_instance_of
(
Integer
)
expect
(
repository
.
commit_count
).
to
be_an
(
Integer
)
end
end
end
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