summaryrefslogtreecommitdiff
path: root/spec
diff options
context:
space:
mode:
authorKyrylo Silin <silin@kyrylo.org>2021-06-28 22:37:18 +0300
committerGitHub <noreply@github.com>2021-06-28 22:37:18 +0300
commit586e1bd1502983cf52d6fd76902224b5731816e9 (patch)
tree56de993579c369f8017f35599f290cf7b3af632e /spec
parent70bcfa06daf37c37d4fd65da0accd588b06403b4 (diff)
parent0c677b7a1db3e204e78ac682487e8c6345c7f64b (diff)
downloadpry-586e1bd1502983cf52d6fd76902224b5731816e9.tar.gz
Merge pull request #2201 from pry/2199-ring-access-by-index-fix
ring: change guard priority so that the value at index can be read
Diffstat (limited to 'spec')
-rw-r--r--spec/ring_spec.rb4
1 files changed, 3 insertions, 1 deletions
diff --git a/spec/ring_spec.rb b/spec/ring_spec.rb
index 4c7efbb5..3d5572ae 100644
--- a/spec/ring_spec.rb
+++ b/spec/ring_spec.rb
@@ -1,7 +1,7 @@
# frozen_string_literal: true
describe Pry::Ring do
- let(:ring) { described_class.new(3) }
+ subject(:ring) { described_class.new(3) }
describe "#<<" do
it "adds elements as is when the ring is not full" do
@@ -28,6 +28,8 @@ describe Pry::Ring do
end
context "when the ring is not full" do
+ subject(:ring) { described_class.new(100) }
+
before { ring << 1 << 2 << 3 }
it "reads elements" do