Simplify tests
This commit is contained in:
parent
cfae23580a
commit
4f5feacb12
1 changed files with 3 additions and 14 deletions
17
test.rb
17
test.rb
|
@ -6,7 +6,7 @@ require 'open3'
|
|||
|
||||
EXE = File.expand_path('exe/referator', __dir__).freeze
|
||||
|
||||
RAW_REFS = {
|
||||
REFS = {
|
||||
self: {
|
||||
foo: {
|
||||
'category' => 'self',
|
||||
|
@ -41,17 +41,6 @@ RAW_REFS = {
|
|||
}.freeze,
|
||||
}.freeze
|
||||
|
||||
REFS = {
|
||||
self: {
|
||||
foo: RAW_REFS[:self][:foo],
|
||||
bar: RAW_REFS[:self][:bar],
|
||||
}.freeze,
|
||||
link: {
|
||||
example_com: RAW_REFS[:link][:example_com],
|
||||
causa_arcana_com: RAW_REFS[:link][:causa_arcana_com],
|
||||
}.freeze,
|
||||
}.freeze
|
||||
|
||||
workdir = File.expand_path('test', __dir__).freeze
|
||||
|
||||
@stdin, @stdout, @wait_thr = Open3.popen2 EXE, workdir, chdir: __dir__
|
||||
|
@ -122,8 +111,8 @@ cmd :REGISTER_FORMAT, { name: :json, script: :render }
|
|||
# REGISTER_REF #
|
||||
################
|
||||
|
||||
cmd :REGISTER_REF, RAW_REFS[:self][:foo]
|
||||
cmd :REGISTER_REF, RAW_REFS[:link][:example_com]
|
||||
cmd :REGISTER_REF, REFS[:self][:foo]
|
||||
cmd :REGISTER_REF, REFS[:link][:example_com]
|
||||
|
||||
cmd(:EXEC, 'conf_register_ref') { |result| raise unless result.nil? }
|
||||
|
||||
|
|
Loading…
Reference in a new issue