From cf419cc6e5b067e99d8217f628a02572f9f99d2d Mon Sep 17 00:00:00 2001 From: yui-knk Date: Mon, 9 Oct 2023 17:40:13 +0900 Subject: [PATCH] Make "spec/lrama/grammar/code_spec.rb" runnable independently Before this commit, `rspec spec/lrama/grammar/code_spec.rb` failed with NameError. ``` NameError: uninitialized constant T ``` --- spec/lrama/grammar/code_spec.rb | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/spec/lrama/grammar/code_spec.rb b/spec/lrama/grammar/code_spec.rb index e3d794d0..a3e4fe9b 100644 --- a/spec/lrama/grammar/code_spec.rb +++ b/spec/lrama/grammar/code_spec.rb @@ -1,7 +1,7 @@ RSpec.describe Lrama::Grammar::Code do let(:token_class) { Lrama::Lexer::Token } - let(:user_code_token) { token_class.new(type: T::User_code, s_value: "{ code 1 }") } - let(:initial_act_token) { token_class.new(type: T::P_initial_action, s_value: "%initial-action") } + let(:user_code_token) { token_class.new(type: token_class::User_code, s_value: "{ code 1 }") } + let(:initial_act_token) { token_class.new(type: token_class::P_initial_action, s_value: "%initial-action") } describe "#translated_code" do context "when the code type is :user_code" do