Sha256: 66969a3514582c06c9b68b7b4f5b1c7ed6d614f447062f1c31aa72b0b7f4269b
Contents?: true
Size: 581 Bytes
Versions: 4
Compression:
Stored size: 581 Bytes
Contents
module DerailSpecs class Server App = Rack::Builder.new do map "/reset-transaction" do run lambda { |_env| Transaction.reset [202, { "Content-Type" => "text/plain" }, ["Accepted"]] } end map "/factory-bot/create" do run lambda { |env| body = Rack::Request.new(env).body.gets object = FactoryBot.create(*JSON.parse(body)) [202, { "Content-Type" => "application/json" }, [object.to_json]] } end map "/" do run Rails.application end end end end
Version data entries
4 entries across 4 versions & 1 rubygems