From aab6431559631b3d48cb0106feaf04e0c242b507 Mon Sep 17 00:00:00 2001 From: Kyrylo Silin Date: Mon, 29 Apr 2019 23:52:05 +0300 Subject: spec/command: fix spec on 1.9.3 The new command state implementation returns an OpenStruct. On Ruby 1.9 OpenStruct doesn't support `#[]`. --- spec/command_spec.rb | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/spec/command_spec.rb b/spec/command_spec.rb index 5991304f..b01cff07 100644 --- a/spec/command_spec.rb +++ b/spec/command_spec.rb @@ -485,8 +485,8 @@ RSpec.describe Pry::Command do end it "remembers the state" do - subject.state[:foo] = :bar - expect(subject.state[:foo]).to eq(:bar) + subject.state.foo = :bar + expect(subject.state.foo).to eq(:bar) end end -- cgit v1.2.1