Skip to content

Commit

Permalink
Add spec
Browse files Browse the repository at this point in the history
  • Loading branch information
y2k2mt committed Aug 8, 2022
1 parent c4514d2 commit f95afd1
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 5 deletions.
3 changes: 2 additions & 1 deletion spec/replay/handler_spec.cr
Original file line number Diff line number Diff line change
Expand Up @@ -29,8 +29,9 @@ describe Replay::RecordingHandler do
actual_response_dir = Dir.new("#{temp_dir_path}/replies/").each_child
actual_response_file = actual_response_dir.next
actual_response_header_file = actual_response_dir.next
actual_request_header = File.new("#{temp_dir_path}/indexes/#{actual_header_file.to_s}").gets_to_end
actual_response_body = File.new("#{temp_dir_path}/replies/#{actual_response_file.to_s}").gets_to_end
actual_response_body.should eq("hello!")
JSON.parse(actual_request_header)["host"].as_s.should eq("www.example.com")
FileUtils.rm_rf(temp_dir_path)
end
end
4 changes: 0 additions & 4 deletions spec/replay_spec.cr
Original file line number Diff line number Diff line change
Expand Up @@ -2,8 +2,4 @@ require "./spec_helper"

describe Replay do
# TODO: Write tests

it "works" do
false.should eq(true)
end
end

0 comments on commit f95afd1

Please sign in to comment.