Skip to content

Commit

Permalink
Add tests with Ruby 3.4
Browse files Browse the repository at this point in the history
Updates a spec that checks User#inspect output to work with the new Hash#inspect behaviour: ruby/ruby#10924
  • Loading branch information
github-actions authored and razumau committed Jan 10, 2025
1 parent 1ab8e86 commit 83dfcb4
Show file tree
Hide file tree
Showing 2 changed files with 7 additions and 1 deletion.
1 change: 1 addition & 0 deletions .github/workflows/main.yml
Original file line number Diff line number Diff line change
Expand Up @@ -20,6 +20,7 @@ jobs:
- "3.1"
- "3.2"
- "3.3"
- "3.4"
- "jruby-9.4"
steps:
- name: Checkout code
Expand Down
7 changes: 6 additions & 1 deletion spec/core/resource_spec.rb
Original file line number Diff line number Diff line change
Expand Up @@ -455,7 +455,12 @@ def to_param

context "#inspect" do
it "should display nicely" do
expect(ZendeskAPI::User.new(client, :foo => :bar).inspect).to eq("#<ZendeskAPI::User {\"foo\"=>:bar}>")
expected_user_representation = if RUBY_VERSION >= "3.4"
"#<ZendeskAPI::User {\"foo\" => :bar}>"
else
"#<ZendeskAPI::User {\"foo\"=>:bar}>"
end
expect(ZendeskAPI::User.new(client, :foo => :bar).inspect).to eq(expected_user_representation)
end
end

Expand Down

0 comments on commit 83dfcb4

Please sign in to comment.