Rake NoMethodError: undefined method 'scan' for Lexicon:Class
问题 I am receiving a NoMethodError: undefined method 'scan' for Lexicon:Class when I try to run a rake test with the following RakeFile. require './lib/ex48/lexicon.rb' require 'test/unit' class TestLexicon < Test::Unit::TestCase def test_directions assert_equal(Lexicon.scan('north'), [%w(direction north)]) end end I have a simple Lexicon class: class Lexicon def initialize @direction = %w(north south east west down up left right back) @verbs = %w(go stop kill eat) @stop_words = %w(the in of from