Skip to content
Snippets Groups Projects
Commit 8183e848 authored by James Lopez's avatar James Lopez
Browse files

fix tricky test failure to do with private method

parent e4e313fc
No related branches found
No related tags found
No related merge requests found
Loading
@@ -56,7 +56,7 @@ module CycleAnalyticsHelpers
Loading
@@ -56,7 +56,7 @@ module CycleAnalyticsHelpers
end end
   
median_time_difference = time_differences.sort[2] 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 end
   
context "when the data belongs to another project" do context "when the data belongs to another project" do
Loading
@@ -88,7 +88,7 @@ module CycleAnalyticsHelpers
Loading
@@ -88,7 +88,7 @@ module CycleAnalyticsHelpers
# Turn off the stub before checking assertions # Turn off the stub before checking assertions
allow(self).to receive(:project).and_call_original 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
end end
   
Loading
@@ -111,7 +111,7 @@ module CycleAnalyticsHelpers
Loading
@@ -111,7 +111,7 @@ module CycleAnalyticsHelpers
   
Timecop.freeze(end_time + 1.day) { post_fn[self, data] } if post_fn 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 end
end end
Loading
@@ -131,7 +131,7 @@ module CycleAnalyticsHelpers
Loading
@@ -131,7 +131,7 @@ module CycleAnalyticsHelpers
Timecop.freeze(end_time + 1.day) { post_fn[self, data] } if post_fn Timecop.freeze(end_time + 1.day) { post_fn[self, data] } if post_fn
end end
   
expect(subject.send(phase)).to be_nil expect(subject.public_send(phase)).to be_nil
end end
end end
end end
Loading
@@ -150,7 +150,7 @@ module CycleAnalyticsHelpers
Loading
@@ -150,7 +150,7 @@ module CycleAnalyticsHelpers
post_fn[self, data] if post_fn post_fn[self, data] if post_fn
end end
   
expect(subject.send(phase)).to be_nil expect(subject.public_send(phase)).to be_nil
end end
end end
end end
Loading
@@ -158,7 +158,7 @@ module CycleAnalyticsHelpers
Loading
@@ -158,7 +158,7 @@ module CycleAnalyticsHelpers
   
context "when none of the start / end conditions are matched" do context "when none of the start / end conditions are matched" do
it "returns nil" do it "returns nil" do
expect(subject.send(phase)).to be_nil expect(subject.public_send(phase)).to be_nil
end end
end end
end end
Loading
Loading
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment