Skip to content

Commit

Permalink
wip
Browse files Browse the repository at this point in the history
  • Loading branch information
exoego committed Jun 28, 2023
1 parent 67da8a8 commit a859997
Show file tree
Hide file tree
Showing 2 changed files with 58 additions and 58 deletions.
58 changes: 29 additions & 29 deletions spec/minitest/rack_test_spec.rb
Original file line number Diff line number Diff line change
Expand Up @@ -4,32 +4,32 @@
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
# end
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
end
58 changes: 29 additions & 29 deletions spec/minitest/rails_spec.rb
Original file line number Diff line number Diff line change
Expand Up @@ -5,32 +5,32 @@
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
# end
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
end

0 comments on commit a859997

Please sign in to comment.