Skip to content

Commit

Permalink
Merge pull request #18 from planningcenter/ruby-3
Browse files Browse the repository at this point in the history
Fix bug with arguments in Ruby 3
  • Loading branch information
seven1m authored Mar 1, 2021
2 parents 053e717 + 6207f27 commit 12d948d
Show file tree
Hide file tree
Showing 2 changed files with 11 additions and 2 deletions.
4 changes: 2 additions & 2 deletions lib/pco/api.rb
Original file line number Diff line number Diff line change
Expand Up @@ -4,8 +4,8 @@
module PCO
module API
module_function
def new(*args)
Endpoint.new(*args)
def new(**args)
Endpoint.new(**args)
end
end
end
9 changes: 9 additions & 0 deletions spec/pco/api_spec.rb
Original file line number Diff line number Diff line change
@@ -0,0 +1,9 @@
require_relative '../spec_helper'

describe PCO::API do
describe '.new' do
it 'creates a new Endpoint instance' do
expect(described_class.new(basic_auth_token: 'abc123', basic_auth_secret: 'xyz789').class).to eq(PCO::API::Endpoint)
end
end
end

0 comments on commit 12d948d

Please sign in to comment.