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
0
Merge Requests
0
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
Boxiang Sun
gitlab-ce
Commits
8183e848
Commit
8183e848
authored
Nov 23, 2016
by
James Lopez
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
fix tricky test failure to do with private method
parent
e4e313fc
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
6 additions
and
6 deletions
+6
-6
spec/support/cycle_analytics_helpers/test_generation.rb
spec/support/cycle_analytics_helpers/test_generation.rb
+6
-6
No files found.
spec/support/cycle_analytics_helpers/test_generation.rb
View file @
8183e848
...
...
@@ -56,7 +56,7 @@ module CycleAnalyticsHelpers
end
median_time_difference
=
time_differences
.
sort
[
2
]
expect
(
subject
.
send
(
phase
)).
to
be_within
(
5
).
of
(
median_time_difference
)
expect
(
subject
.
public_
send
(
phase
)).
to
be_within
(
5
).
of
(
median_time_difference
)
end
context
"when the data belongs to another project"
do
...
...
@@ -88,7 +88,7 @@ module CycleAnalyticsHelpers
# Turn off the stub before checking assertions
allow
(
self
).
to
receive
(
:project
).
and_call_original
expect
(
subject
.
send
(
phase
)).
to
be_nil
expect
(
subject
.
public_
send
(
phase
)).
to
be_nil
end
end
...
...
@@ -111,7 +111,7 @@ module CycleAnalyticsHelpers
Timecop
.
freeze
(
end_time
+
1
.
day
)
{
post_fn
[
self
,
data
]
}
if
post_fn
expect
(
subject
.
send
(
phase
)).
to
be_nil
expect
(
subject
.
public_
send
(
phase
)).
to
be_nil
end
end
end
...
...
@@ -131,7 +131,7 @@ module CycleAnalyticsHelpers
Timecop
.
freeze
(
end_time
+
1
.
day
)
{
post_fn
[
self
,
data
]
}
if
post_fn
end
expect
(
subject
.
send
(
phase
)).
to
be_nil
expect
(
subject
.
public_
send
(
phase
)).
to
be_nil
end
end
end
...
...
@@ -150,7 +150,7 @@ module CycleAnalyticsHelpers
post_fn
[
self
,
data
]
if
post_fn
end
expect
(
subject
.
send
(
phase
)).
to
be_nil
expect
(
subject
.
public_
send
(
phase
)).
to
be_nil
end
end
end
...
...
@@ -158,7 +158,7 @@ module CycleAnalyticsHelpers
context
"when none of the start / end conditions are matched"
do
it
"returns nil"
do
expect
(
subject
.
send
(
phase
)).
to
be_nil
expect
(
subject
.
public_
send
(
phase
)).
to
be_nil
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