From eff3dafca52a055e68641e34fc139a902348faa9 Mon Sep 17 00:00:00 2001 From: Xero Date: Wed, 28 Feb 2024 15:34:58 -0500 Subject: [PATCH] plural problems! --- lib/plants/resources/distributions.rb | 6 +++--- spec/plants_spec.rb | 4 ++-- 2 files changed, 5 insertions(+), 5 deletions(-) diff --git a/lib/plants/resources/distributions.rb b/lib/plants/resources/distributions.rb index 7d5800b..e0d0c03 100644 --- a/lib/plants/resources/distributions.rb +++ b/lib/plants/resources/distributions.rb @@ -9,10 +9,10 @@ def list_distributions client.get('distributions') end - # @param distributions [String] + # @param distribution [String] # @return [::HTTP::Response] - def find_distributions(distributions) - client.get("distributions/#{distributions}") + def find_distribution(distribution) + client.get("distributions/#{distribution}") end end end diff --git a/spec/plants_spec.rb b/spec/plants_spec.rb index 4e95312..b24febf 100644 --- a/spec/plants_spec.rb +++ b/spec/plants_spec.rb @@ -349,13 +349,13 @@ end end - describe '.find_distributions' do + describe '.find_distribution' do before(:each) do stub_request(:get, "#{Plants::Client::URL}/distributions/foobar") .to_return(status: 200, body: '{}') end - subject { Plants.find_distributions('foobar') } + subject { Plants.find_distribution('foobar') } it do expect(subject).to be_instance_of(HTTP::Response)