Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Upgrade for ruby 3.2.0 #43

Merged
merged 6 commits into from
Aug 28, 2023
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
1 change: 1 addition & 0 deletions .github/workflows/tcr.yml
Original file line number Diff line number Diff line change
Expand Up @@ -16,6 +16,7 @@ jobs:
- "2.7"
- "3.0"
- "3.1"
- "3.2"
steps:
- uses: actions/checkout@v2
- name: Set up Ruby
Expand Down
2 changes: 1 addition & 1 deletion lib/tcr/cassette.rb
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,7 @@ def initialize(name)
end

def recording?
@recording ||= !File.exists?(filename)
@recording ||= !File.exist?(filename)
end

def next_session
Expand Down
18 changes: 9 additions & 9 deletions spec/tcr_spec.rb
Original file line number Diff line number Diff line change
Expand Up @@ -15,13 +15,13 @@
end

around(:each) do |example|
File.unlink("test.json") if File.exists?("test.json")
File.unlink("test.yaml") if File.exists?("test.yaml")
File.unlink("test.marshal") if File.exists?("test.marshal")
File.unlink("test.json") if File.exist?("test.json")
File.unlink("test.yaml") if File.exist?("test.yaml")
File.unlink("test.marshal") if File.exist?("test.marshal")
example.run
File.unlink("test.json") if File.exists?("test.json")
File.unlink("test.yaml") if File.exists?("test.yaml")
File.unlink("test.marshal") if File.exists?("test.marshal")
File.unlink("test.json") if File.exist?("test.json")
File.unlink("test.yaml") if File.exist?("test.yaml")
File.unlink("test.marshal") if File.exist?("test.marshal")
end

describe ".configuration" do
Expand Down Expand Up @@ -214,7 +214,7 @@
TCR.use_cassette("test") do
tcp_socket = TCPSocket.open("smtp.mandrillapp.com", 2525)
end
}.to change{ File.exists?("./test.json") }.from(false).to(true)
}.to change{ File.exist?("./test.json") }.from(false).to(true)
end

it "records the tcp session data into the file" do
Expand All @@ -237,7 +237,7 @@
TCR.use_cassette("test") do
tcp_socket = TCPSocket.open("smtp.mandrillapp.com", 2525)
end
}.to change{ File.exists?("./test.yaml") }.from(false).to(true)
}.to change{ File.exist?("./test.yaml") }.from(false).to(true)
end

it "records the tcp session data into the yaml file" do
Expand All @@ -261,7 +261,7 @@
TCR.use_cassette("test") do
tcp_socket = TCPSocket.open("smtp.mandrillapp.com", 2525)
end
}.to change{ File.exists?("./test.marshal") }.from(false).to(true)
}.to change{ File.exist?("./test.marshal") }.from(false).to(true)
end

it "records the tcp session data into the marshalled file" do
Expand Down
Loading