From d94ec6c72c2aaa154ed10fd29a9bfe183cb8681e Mon Sep 17 00:00:00 2001 From: Torsten Ruger Date: Thu, 4 Sep 2014 14:22:28 +0300 Subject: [PATCH] fix parfait test --- lib/parfait/hash.rb | 4 +++- lib/salama.rb | 4 +++- test/parfait/{hash.rb => hash_test.rb} | 3 +-- test/test_all.rb | 2 +- 4 files changed, 8 insertions(+), 5 deletions(-) rename test/parfait/{hash.rb => hash_test.rb} (95%) diff --git a/lib/parfait/hash.rb b/lib/parfait/hash.rb index 43469d08..884c9293 100644 --- a/lib/parfait/hash.rb +++ b/lib/parfait/hash.rb @@ -1,5 +1,7 @@ # almost simplest hash imaginable. make good use of arrays -class Hash +module Parfait +end +class Parfait::Hash def initialize @keys = Array.new() @values = Array.new() diff --git a/lib/salama.rb b/lib/salama.rb index e2d37f7b..350d4fbb 100644 --- a/lib/salama.rb +++ b/lib/salama.rb @@ -7,4 +7,6 @@ require "virtual/machine" require "ast/all" require "sof/all" require "register/register_machine" -require_relative "stream_reader" \ No newline at end of file +require_relative "stream_reader" + +require_relative "parfait/hash" diff --git a/test/parfait/hash.rb b/test/parfait/hash_test.rb similarity index 95% rename from test/parfait/hash.rb rename to test/parfait/hash_test.rb index c15b95e5..757d4937 100644 --- a/test/parfait/hash.rb +++ b/test/parfait/hash_test.rb @@ -1,10 +1,9 @@ require_relative "../helper" -require "parfait/hash" class TestLists < MiniTest::Test def setup - @list = Hash.new + @list = ::Parfait::Hash.new end def test_list_create assert @list.empty? diff --git a/test/test_all.rb b/test/test_all.rb index 8635c543..2d1636b9 100644 --- a/test/test_all.rb +++ b/test/test_all.rb @@ -1,6 +1,6 @@ # All working tests (ahm), still working on the others, so no use to be constantly reminded require_relative "arm/test_all" -require_relative "parfait/hash" require_relative "sof" +require "parfait/hash_test" #require_relative "virtual/test_all"