summaryrefslogtreecommitdiff
path: root/spec/support
diff options
context:
space:
mode:
authorJames Lopez <james@jameslopez.es>2016-11-23 15:35:47 +0100
committerJames Lopez <james@jameslopez.es>2017-01-17 11:32:55 +0100
commit8183e848648bc737e4a09f76f4f55ee1cf106b26 (patch)
tree1f25991458916f7dfef3e5cbcdd2a0a18ebc8951 /spec/support
parente4e313fccab6816fb2e52ebdf83807fba4a52051 (diff)
downloadgitlab-ce-8183e848648bc737e4a09f76f4f55ee1cf106b26.tar.gz
fix tricky test failure to do with private method
Diffstat (limited to 'spec/support')
-rw-r--r--spec/support/cycle_analytics_helpers/test_generation.rb12
1 files changed, 6 insertions, 6 deletions
diff --git a/spec/support/cycle_analytics_helpers/test_generation.rb b/spec/support/cycle_analytics_helpers/test_generation.rb
index ab624161616..dc866b11429 100644
--- a/spec/support/cycle_analytics_helpers/test_generation.rb
+++ b/spec/support/cycle_analytics_helpers/test_generation.rb
@@ -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