[DRE-commits] [ruby-berkshelf-api-client] 04/08: Patch: Update rspec syntax with transpec

Hleb Valoshka tsfgnu-guest at moszumanska.debian.org
Thu Mar 24 14:08:17 UTC 2016


This is an automated email from the git hooks/post-receive script.

tsfgnu-guest pushed a commit to branch master
in repository ruby-berkshelf-api-client.

commit 7c25711e6b75af012bfd8cb17aaf577d1a471f12
Author: Hleb Valoshka <375gnu at gmail.com>
Date:   Thu Mar 24 17:01:51 2016 +0300

    Patch: Update rspec syntax with transpec
---
 .../0003-Update-rspec-syntax-with-transpec.patch   | 75 ++++++++++++++++++++++
 debian/patches/series                              |  1 +
 2 files changed, 76 insertions(+)

diff --git a/debian/patches/0003-Update-rspec-syntax-with-transpec.patch b/debian/patches/0003-Update-rspec-syntax-with-transpec.patch
new file mode 100644
index 0000000..273fdc6
--- /dev/null
+++ b/debian/patches/0003-Update-rspec-syntax-with-transpec.patch
@@ -0,0 +1,75 @@
+From: Hleb Valoshka <375gnu at gmail.com>
+Date: Thu, 24 Mar 2016 16:48:08 +0300
+Subject: Update rspec syntax with transpec
+
+---
+ spec/unit/berkshelf/api_client/connection_spec.rb  |  4 +--
+ .../berkshelf/api_client/remote_cookbook_spec.rb   | 35 ++++++++++++++++++----
+ 2 files changed, 31 insertions(+), 8 deletions(-)
+
+diff --git a/spec/unit/berkshelf/api_client/connection_spec.rb b/spec/unit/berkshelf/api_client/connection_spec.rb
+index b79fa68..8d3f3d7 100644
+--- a/spec/unit/berkshelf/api_client/connection_spec.rb
++++ b/spec/unit/berkshelf/api_client/connection_spec.rb
+@@ -21,7 +21,7 @@ describe Berkshelf::APIClient::Connection do
+     end
+ 
+     it "contains a item for each dependency" do
+-      expect(subject).to have(3).items
++      expect(subject.size).to eq(3)
+       expect(subject[0].name).to eql("ruby")
+       expect(subject[0].version).to eql("1.2.3")
+       expect(subject[1].name).to eql("ruby")
+@@ -56,7 +56,7 @@ describe Berkshelf::APIClient::Connection do
+ 
+     context "when the connection to the service fails" do
+       before do
+-        instance.should_receive(:get).and_raise(Faraday::Error::ConnectionFailed.new(StandardError))
++        expect(instance).to receive(:get).and_raise(Faraday::Error::ConnectionFailed.new(StandardError))
+       end
+ 
+       it "raises a Berkshelf::APIClient::ServiceUnavaiable" do
+diff --git a/spec/unit/berkshelf/api_client/remote_cookbook_spec.rb b/spec/unit/berkshelf/api_client/remote_cookbook_spec.rb
+index 5078671..c721671 100644
+--- a/spec/unit/berkshelf/api_client/remote_cookbook_spec.rb
++++ b/spec/unit/berkshelf/api_client/remote_cookbook_spec.rb
+@@ -14,10 +14,33 @@ describe Berkshelf::APIClient::RemoteCookbook do
+ 
+   subject { described_class.new(name, version, attributes) }
+ 
+-  its(:name) { should eql(name) }
+-  its(:version) { should eql(version) }
+-  its(:dependencies) { should eql(dependencies) }
+-  its(:platforms) { should eql(platforms) }
+-  its(:location_type) { should eql(:chef_server) }
+-  its(:location_path) { should eql(location_path) }
++  describe '#name' do
++    subject { super().name }
++    it { is_expected.to eql(name) }
++  end
++
++  describe '#version' do
++    subject { super().version }
++    it { is_expected.to eql(version) }
++  end
++
++  describe '#dependencies' do
++    subject { super().dependencies }
++    it { is_expected.to eql(dependencies) }
++  end
++
++  describe '#platforms' do
++    subject { super().platforms }
++    it { is_expected.to eql(platforms) }
++  end
++
++  describe '#location_type' do
++    subject { super().location_type }
++    it { is_expected.to eql(:chef_server) }
++  end
++
++  describe '#location_path' do
++    subject { super().location_path }
++    it { is_expected.to eql(location_path) }
++  end
+ end
diff --git a/debian/patches/series b/debian/patches/series
index 960a7f9..09385e2 100644
--- a/debian/patches/series
+++ b/debian/patches/series
@@ -1,2 +1,3 @@
 0001-Relax-dependencies-in-gemfile.patch
 0002-Don-t-require-rubygems-bundler-and-spork.patch
+0003-Update-rspec-syntax-with-transpec.patch

-- 
Alioth's /usr/local/bin/git-commit-notice on /srv/git.debian.org/git/pkg-ruby-extras/ruby-berkshelf-api-client.git



More information about the Pkg-ruby-extras-commits mailing list