From 2b0c7224953866d56a045f1f12c718eebec7b0d2 Mon Sep 17 00:00:00 2001 From: exoego Date: Fri, 3 Nov 2023 10:20:44 +0900 Subject: [PATCH] wip --- spec/minitest/rack_test_spec.rb | 41 -------------------------------- spec/minitest/rails_spec.rb | 42 --------------------------------- 2 files changed, 83 deletions(-) delete mode 100644 spec/minitest/rack_test_spec.rb delete mode 100644 spec/minitest/rails_spec.rb diff --git a/spec/minitest/rack_test_spec.rb b/spec/minitest/rack_test_spec.rb deleted file mode 100644 index 20c8d424..00000000 --- a/spec/minitest/rack_test_spec.rb +++ /dev/null @@ -1,41 +0,0 @@ -# frozen_string_literal: true - -require 'spec_helper' -require 'fileutils' -require 'yaml' - -RSpec.describe 'rack-test minitest' do - include SpecHelper - - describe 'yaml output' do - let(:openapi_path) do - File.expand_path('spec/roda/doc/openapi.yaml', repo_root) - end - - it 'generates the same spec/roda/doc/openapi.yaml' do - org_yaml = YAML.safe_load(File.read(openapi_path)) - minitest 'spec/integration_tests/roda_test.rb', openapi: true - new_yaml = YAML.safe_load(File.read(openapi_path)) - expect(new_yaml).to eq org_yaml - end - end - - describe 'json output' do - let(:openapi_path) do - File.expand_path('spec/roda/doc/openapi.json', repo_root) - end - - it 'generates the same spec/roda/doc/openapi.json' do - org_yaml = YAML.safe_load(File.read(openapi_path)) - minitest 'spec/integration_tests/roda_test.rb', openapi: true, output: :json - new_yaml = YAML.safe_load(File.read(openapi_path)) - expect(new_yaml).to eq org_yaml - end - end - - describe 'with disabled OpenAPI generation' do - it 'can run tests' do - minitest 'spec/integration_tests/roda_test.rb' - end - end -end diff --git a/spec/minitest/rails_spec.rb b/spec/minitest/rails_spec.rb deleted file mode 100644 index d67a3cab..00000000 --- a/spec/minitest/rails_spec.rb +++ /dev/null @@ -1,42 +0,0 @@ -# frozen_string_literal: true - -require 'spec_helper' -require 'yaml' -require 'json' -require 'pry' - -RSpec.describe 'rails integration minitest' do - include SpecHelper - - describe 'yaml output' do - let(:openapi_path) do - File.expand_path('spec/rails/doc/openapi.yaml', repo_root) - end - - it 'generates the same spec/rails/doc/openapi.yaml' do - org_yaml = YAML.safe_load(File.read(openapi_path)) - minitest 'spec/integration_tests/rails_test.rb', openapi: true, output: :yaml - new_yaml = YAML.safe_load(File.read(openapi_path)) - expect(new_yaml).to eq org_yaml - end - end - - describe 'json' do - let(:openapi_path) do - File.expand_path('spec/rails/doc/openapi.json', repo_root) - end - - it 'generates the same spec/rails/doc/openapi.json' do - org_yaml = JSON.parse(File.read(openapi_path)) - minitest 'spec/integration_tests/rails_test.rb', openapi: true, output: :json - new_yaml = JSON.parse(File.read(openapi_path)) - expect(new_yaml).to eq org_yaml - end - end - - describe 'with disabled OpenAPI generation' do - it 'can run tests' do - minitest 'spec/integration_tests/rails_test.rb' - end - end -end