[DRE-commits] [ruby-progressbar] 09/12: Add patch 0001-Make-spec-RSpec3-compatible.patch
Hleb Valoshka
tsfgnu-guest at moszumanska.debian.org
Mon Jun 22 10:58:34 UTC 2015
This is an automated email from the git hooks/post-receive script.
tsfgnu-guest pushed a commit to branch master
in repository ruby-progressbar.
commit 6b88dddc120bc04b0f3fcd7f8a2ca77680bacb52
Author: Hleb Valoshka <375gnu at gmail.com>
Date: Thu Jun 4 18:13:48 2015 +0300
Add patch 0001-Make-spec-RSpec3-compatible.patch
---
.../patches/0001-Make-spec-RSpec3-compatible.patch | 1224 ++++++++++++++++++++
debian/patches/series | 1 +
2 files changed, 1225 insertions(+)
diff --git a/debian/patches/0001-Make-spec-RSpec3-compatible.patch b/debian/patches/0001-Make-spec-RSpec3-compatible.patch
new file mode 100644
index 0000000..3144dbd
--- /dev/null
+++ b/debian/patches/0001-Make-spec-RSpec3-compatible.patch
@@ -0,0 +1,1224 @@
+From: Hleb Valoshka <375gnu at gmail.com>
+Date: Thu, 4 Jun 2015 18:13:13 +0300
+Subject: Make spec RSpec3 compatible
+
+---
+ spec/lib/ruby-progressbar/base_spec.rb | 170 ++++++++++-----------
+ spec/lib/ruby-progressbar/components/bar_spec.rb | 52 +++----
+ .../components/elapsed_timer_spec.rb | 18 +--
+ .../components/estimated_timer_spec.rb | 34 ++---
+ .../components/progressable_spec.rb | 10 +-
+ .../ruby-progressbar/components/throttle_spec.rb | 14 +-
+ spec/lib/ruby-progressbar/format/molecule_spec.rb | 6 +-
+ .../running_average_calculator_spec.rb | 6 +-
+ spec/lib/ruby-progressbar/time_spec.rb | 10 +-
+ 9 files changed, 160 insertions(+), 160 deletions(-)
+
+diff --git a/spec/lib/ruby-progressbar/base_spec.rb b/spec/lib/ruby-progressbar/base_spec.rb
+index 37cd742..6949f1d 100644
+--- a/spec/lib/ruby-progressbar/base_spec.rb
++++ b/spec/lib/ruby-progressbar/base_spec.rb
+@@ -4,13 +4,13 @@ require 'stringio'
+ describe ProgressBar::Base do
+ let(:output) do
+ StringIO.new('', 'w+').tap do |io|
+- io.stub(:tty?).and_return true
++ allow(io).to receive(:tty?).and_return true
+ end
+ end
+
+ let(:non_tty_output) do
+ StringIO.new('', 'w+').tap do |io|
+- io.stub(:tty?).and_return false
++ allow(io).to receive(:tty?).and_return false
+ end
+ end
+
+@@ -31,7 +31,7 @@ describe ProgressBar::Base do
+ progressbar.increment
+
+ output.rewind
+- output.read.should match /\raaaaaaaaaaaaaaaaaaaaaaaaa \r\s+\raaaaaaaaaaaaaaaaaaaaaaaaa\r\z/
++ expect(output.read).to match /\raaaaaaaaaaaaaaaaaaaaaaaaa \r\s+\raaaaaaaaaaaaaaaaaaaaaaaaa\r\z/
+ end
+
+ context 'and the bar length is calculated' do
+@@ -41,7 +41,7 @@ describe ProgressBar::Base do
+ allow(progressbar).to receive(:terminal_width).
+ and_return 20
+
+- progressbar.to_s('%t%w').should eql '*********************'
++ expect(progressbar.to_s('%t%w')).to eql '*********************'
+ end
+ end
+
+@@ -52,7 +52,7 @@ describe ProgressBar::Base do
+ allow(progressbar).to receive(:terminal_width).
+ and_return 20
+
+- progressbar.to_s('%t%i').should eql '*********************'
++ expect(progressbar.to_s('%t%i')).to eql '*********************'
+ end
+
+ it 'returns the proper string' do
+@@ -61,7 +61,7 @@ describe ProgressBar::Base do
+ allow(progressbar).to receive(:terminal_width).
+ and_return 20
+
+- progressbar.to_s('%t%i').should eql '*********************'
++ expect(progressbar.to_s('%t%i')).to eql '*********************'
+ end
+ end
+
+@@ -72,7 +72,7 @@ describe ProgressBar::Base do
+ allow(progressbar).to receive(:terminal_width).
+ and_return 20
+
+- progressbar.to_s('%t%B').should eql '******************* '
++ expect(progressbar.to_s('%t%B')).to eql '******************* '
+ end
+
+ it 'returns the proper string' do
+@@ -81,7 +81,7 @@ describe ProgressBar::Base do
+ allow(progressbar).to receive(:terminal_width).
+ and_return 20
+
+- progressbar.to_s('%t%w%i').should eql '******************* '
++ expect(progressbar.to_s('%t%w%i')).to eql '******************* '
+ end
+ end
+ end
+@@ -92,13 +92,13 @@ describe ProgressBar::Base do
+
+ describe '#title' do
+ it 'returns the default title' do
+- progressbar.send(:title).to_s.should eql ProgressBar::Base::DEFAULT_TITLE
++ expect(progressbar.send(:title).to_s).to eql ProgressBar::Base::DEFAULT_TITLE
+ end
+ end
+
+ describe '#output' do
+ it 'returns the default output stream' do
+- progressbar.send(:output).should eql ProgressBar::Base::DEFAULT_OUTPUT_STREAM
++ expect(progressbar.send(:output)).to eql ProgressBar::Base::DEFAULT_OUTPUT_STREAM
+ end
+ end
+
+@@ -109,7 +109,7 @@ describe ProgressBar::Base do
+
+ it 'returns the length of the environment variable as an integer' do
+ progressbar = ProgressBar::Base.new
+- progressbar.send(:length).should eql 44
++ expect(progressbar.send(:length)).to eql 44
+ end
+ end
+
+@@ -119,21 +119,21 @@ describe ProgressBar::Base do
+ context 'but the length option was passed in' do
+ it 'returns the length specified in the option' do
+ progressbar = ProgressBar::Base.new(:length => 88)
+- progressbar.send(:length).should eql 88
++ expect(progressbar.send(:length)).to eql 88
+ end
+ end
+
+ context 'and no length option was passed in' do
+ it 'returns the width of the terminal if it is a Unix environment' do
+- progressbar.stub(:terminal_width).and_return(99)
++ allow(progressbar).to receive(:terminal_width).and_return(99)
+ progressbar.send(:reset_length)
+- progressbar.send(:length).should eql 99
++ expect(progressbar.send(:length)).to eql 99
+ end
+
+ it 'returns 80 if it is not a Unix environment' do
+- progressbar.stub(:unix?).and_return(false)
++ allow(progressbar).to receive(:unix?).and_return(false)
+ progressbar.send(:reset_length)
+- progressbar.send(:length).should eql 80
++ expect(progressbar.send(:length)).to eql 80
+ end
+ end
+ end
+@@ -145,19 +145,19 @@ describe ProgressBar::Base do
+
+ describe '#title' do
+ it 'returns the overridden title' do
+- progressbar.send(:title).to_s.should eql 'We All Float'
++ expect(progressbar.send(:title).to_s).to eql 'We All Float'
+ end
+ end
+
+ describe '#output' do
+ it 'returns the overridden output stream' do
+- progressbar.send(:output).should eql STDOUT
++ expect(progressbar.send(:output)).to eql STDOUT
+ end
+ end
+
+ describe '#length' do
+ it 'returns the overridden length' do
+- progressbar.send(:length).should eql 88
++ expect(progressbar.send(:length)).to eql 88
+ end
+ end
+ end
+@@ -185,15 +185,15 @@ describe ProgressBar::Base do
+
+ it 'completes the bar' do
+ output.rewind
+- output.read.should match /Progress: \|#{'=' * 68}\|\n/
++ expect(output.read).to match /Progress: \|#{'=' * 68}\|\n/
+ end
+
+ it 'shows the elapsed time instead of the estimated time since the bar is completed' do
+- progressbar.to_s('%e').should eql 'Time: 00:02:00'
++ expect(progressbar.to_s('%e')).to eql 'Time: 00:02:00'
+ end
+
+ it 'calculates the elapsed time to 00:02:00' do
+- progressbar.to_s('%a').should eql 'Time: 00:02:00'
++ expect(progressbar.to_s('%a')).to eql 'Time: 00:02:00'
+ end
+ end
+ end
+@@ -216,7 +216,7 @@ describe ProgressBar::Base do
+ progressbar.increment
+
+ output.rewind
+- output.read.should include "#{@color_code}Processing... #{@progress_mark * 3}#{' ' * 3}#{@reset_code}#{@color_code} 50%#{@reset_code}\r#{@color_code}Processing... #{@progress_mark * 3}#{' ' * 3}#{@reset_code}#{@color_code} 66%#{@reset_code}\r#{@color_code}Processing... #{@progress_mark * 4}#{' ' * 2}#{@reset_code}#{@color_code} 83%#{@reset_code}\r"
++ expect(output.read).to include "#{@color_code}Processing... #{@progress_mark * 3}#{' ' * 3}#{@reset_code}#{@color_code} 50%#{@reset_code}\r#{@color_code}Processing... #{@progress_mark * 3}#{' ' * 3}#{@reset_code}#{@color_code} 66%#{@reset_code}\r#{@color_code}Processing... #{@progress_mark * 4}#{' ' * 2}#{@reset_code}#{@color_code} 83%#{@reset_code}\r"
+ end
+
+ it 'properly calculates the length of the bar by removing the short version of the ANSI codes from the calculated length' do
+@@ -235,7 +235,7 @@ describe ProgressBar::Base do
+ progressbar.increment
+
+ output.rewind
+- output.read.should include "#{@color_code}Processing... #{@progress_mark * 3}#{' ' * 3}#{@reset_code}#{@color_code} 50%#{@reset_code}\r#{@color_code}Processing... #{@progress_mark * 3}#{' ' * 3}#{@reset_code}#{@color_code} 66%#{@reset_code}\r#{@color_code}Processing... #{@progress_mark * 4}#{' ' * 2}#{@reset_code}#{@color_code} 83%#{@reset_code}\r"
++ expect(output.read).to include "#{@color_code}Processing... #{@progress_mark * 3}#{' ' * 3}#{@reset_code}#{@color_code} 50%#{@reset_code}\r#{@color_code}Processing... #{@progress_mark * 3}#{' ' * 3}#{@reset_code}#{@color_code} 66%#{@reset_code}\r#{@color_code}Processing... #{@progress_mark * 4}#{' ' * 2}#{@reset_code}#{@color_code} 83%#{@reset_code}\r"
+ end
+ end
+
+@@ -247,7 +247,7 @@ describe ProgressBar::Base do
+ progressbar.increment
+
+ output.rewind
+- output.read.should include "Progress: |==== |\rProgress: |===== |\r \rWe All Float\nProgress: |===== |\rProgress: |====== |\r"
++ expect(output.read).to include "Progress: |==== |\rProgress: |===== |\r \rWe All Float\nProgress: |===== |\rProgress: |====== |\r"
+ end
+ end
+
+@@ -260,7 +260,7 @@ describe ProgressBar::Base do
+ progressbar.finish
+
+ non_tty_output.rewind
+- non_tty_output.read.should include "We All Float\nProgress: |========|\n"
++ expect(non_tty_output.read).to include "We All Float\nProgress: |========|\n"
+ end
+
+ it 'can output the bar properly so that it does not spam the screen' do
+@@ -269,7 +269,7 @@ describe ProgressBar::Base do
+ 6.times { progressbar.increment }
+
+ non_tty_output.rewind
+- non_tty_output.read.should eql "\n\nProgress: |========|\n"
++ expect(non_tty_output.read).to eql "\n\nProgress: |========|\n"
+ end
+
+ it 'can output the bar properly if finished in the middle of its progress' do
+@@ -280,7 +280,7 @@ describe ProgressBar::Base do
+ progressbar.finish
+
+ non_tty_output.rewind
+- non_tty_output.read.should eql "\n\nProgress: |========|\n"
++ expect(non_tty_output.read).to eql "\n\nProgress: |========|\n"
+ end
+
+ it 'can output the bar properly if stopped in the middle of its progress' do
+@@ -291,7 +291,7 @@ describe ProgressBar::Base do
+ progressbar.stop
+
+ non_tty_output.rewind
+- non_tty_output.read.should eql "\n\nProgress: |====\n"
++ expect(non_tty_output.read).to eql "\n\nProgress: |====\n"
+ end
+ end
+ end
+@@ -303,19 +303,19 @@ describe ProgressBar::Base do
+ before { progressbar.increment }
+
+ it 'registers as being "finished"' do
+- progressbar.should be_finished
++ expect(progressbar).to be_finished
+ end
+
+ it 'prints a new line' do
+ output.rewind
+- output.read.end_with?("\n").should be_true
++ expect(output.read.end_with?("\n")).to be_truthy
+ end
+
+ it 'does not continue to print bars if finish is subsequently called' do
+ progressbar.finish
+
+ output.rewind
+- output.read.should end_with " \rProgress: |====== |\rProgress: |========|\n"
++ expect(output.read).to end_with " \rProgress: |====== |\rProgress: |========|\n"
+ end
+ end
+ end
+@@ -324,25 +324,25 @@ describe ProgressBar::Base do
+ let(:progressbar) { ProgressBar::Base.new(:total => nil, :output => output, :length => 80, :unknown_progress_animation_steps => ['=--', '-=-', '--=']) }
+
+ it 'is represented correctly' do
+- progressbar.to_s('%i').should eql '=--=--=--=--=--=--=--=--=--=--=--=--=--=--=--=--=--=--=--=--=--=--=--=--=--=--=-'
++ expect(progressbar.to_s('%i')).to eql '=--=--=--=--=--=--=--=--=--=--=--=--=--=--=--=--=--=--=--=--=--=--=--=--=--=--=-'
+ end
+
+ it 'is represented after being incremented once' do
+ progressbar.increment
+- progressbar.to_s('%i').should eql '-=--=--=--=--=--=--=--=--=--=--=--=--=--=--=--=--=--=--=--=--=--=--=--=--=--=--='
++ expect(progressbar.to_s('%i')).to eql '-=--=--=--=--=--=--=--=--=--=--=--=--=--=--=--=--=--=--=--=--=--=--=--=--=--=--='
+ end
+
+ it 'is represented after being incremented twice' do
+ progressbar.increment
+ progressbar.increment
+- progressbar.to_s('%i').should eql '--=--=--=--=--=--=--=--=--=--=--=--=--=--=--=--=--=--=--=--=--=--=--=--=--=--=--'
++ expect(progressbar.to_s('%i')).to eql '--=--=--=--=--=--=--=--=--=--=--=--=--=--=--=--=--=--=--=--=--=--=--=--=--=--=--'
+ end
+
+ it 'displays the proper ETA' do
+ progressbar.increment
+
+- progressbar.to_s('%i%e').should eql '-=--=--=--=--=--=--=--=--=--=--=--=--=--=--=--=--=--=--=--=--=--=- ETA: ??:??:??'
+- progressbar.to_s('%i%E').should eql '-=--=--=--=--=--=--=--=--=--=--=--=--=--=--=--=--=--=--=--=--=--=- ETA: ??:??:??'
++ expect(progressbar.to_s('%i%e')).to eql '-=--=--=--=--=--=--=--=--=--=--=--=--=--=--=--=--=--=--=--=--=--=- ETA: ??:??:??'
++ expect(progressbar.to_s('%i%E')).to eql '-=--=--=--=--=--=--=--=--=--=--=--=--=--=--=--=--=--=--=--=--=--=- ETA: ??:??:??'
+ end
+ end
+
+@@ -357,7 +357,7 @@ describe ProgressBar::Base do
+ progressbar.progress_mark = 'x'
+
+ output.rewind
+- output.read.should match /\rProgress: \|xxxxxx#{' ' * 62}\|\r\z/
++ expect(output.read).to match /\rProgress: \|xxxxxx#{' ' * 62}\|\r\z/
+ end
+ end
+
+@@ -366,7 +366,7 @@ describe ProgressBar::Base do
+ progressbar.remainder_mark = 'x'
+
+ output.rewind
+- output.read.should match /\rProgress: \|======#{'x' * 62}\|\r\z/
++ expect(output.read).to match /\rProgress: \|======#{'x' * 62}\|\r\z/
+ end
+ end
+
+@@ -375,7 +375,7 @@ describe ProgressBar::Base do
+ progressbar.title = 'Items'
+
+ output.rewind
+- output.read.should match /\rItems: \|=======#{' ' * 64}\|\r\z/
++ expect(output.read).to match /\rItems: \|=======#{' ' * 64}\|\r\z/
+ end
+ end
+
+@@ -384,7 +384,7 @@ describe ProgressBar::Base do
+
+ it 'resets the bar back to the starting value' do
+ output.rewind
+- output.read.should match /\rProgress: \|#{' ' * 68}\|\r\z/
++ expect(output.read).to match /\rProgress: \|#{' ' * 68}\|\r\z/
+ end
+ end
+
+@@ -393,7 +393,7 @@ describe ProgressBar::Base do
+
+ it 'forcibly halts the bar wherever it is and cancels it' do
+ output.rewind
+- output.read.should match /\rProgress: \|======#{' ' * 62}\|\n\z/
++ expect(output.read).to match /\rProgress: \|======#{' ' * 62}\|\n\z/
+ end
+
+ it 'does not output the bar multiple times if the bar is already stopped' do
+@@ -401,7 +401,7 @@ describe ProgressBar::Base do
+ progressbar.stop
+ output.rewind
+
+- output.read.should_not start_with "Progress: |======#{' ' * 62}|"
++ expect(output.read).not_to start_with "Progress: |======#{' ' * 62}|"
+ end
+ end
+
+@@ -411,7 +411,7 @@ describe ProgressBar::Base do
+ progressbar.resume
+ output.rewind
+
+- output.read.should_not start_with "Progress: |======#{' ' * 62}|"
++ expect(output.read).not_to start_with "Progress: |======#{' ' * 62}|"
+ end
+ end
+ end
+@@ -428,7 +428,7 @@ describe ProgressBar::Base do
+
+ it 'resets the bar back to the starting value' do
+ output.rewind
+- output.read.should match /\rProgress: \|==========#{' ' * 90}\|\r\z/
++ expect(output.read).to match /\rProgress: \|==========#{' ' * 90}\|\r\z/
+ end
+ end
+ end
+@@ -439,7 +439,7 @@ describe ProgressBar::Base do
+ progressbar.clear
+
+ output.rewind
+- output.read.should match /^#{progressbar.send(:clear_string)}/
++ expect(output.read).to match /^#{progressbar.send(:clear_string)}/
+ end
+ end
+
+@@ -448,21 +448,21 @@ describe ProgressBar::Base do
+ progressbar.start
+
+ output.rewind
+- output.read.should match /^#{progressbar.send(:clear_string)}/
++ expect(output.read).to match /^#{progressbar.send(:clear_string)}/
+ end
+
+ it 'prints the bar for the first time' do
+ progressbar.start
+
+ output.rewind
+- output.read.should match /Progress: \| \|\r\z/
++ expect(output.read).to match /Progress: \| \|\r\z/
+ end
+
+ it 'prints correctly if passed a position to start at' do
+ progressbar.start(:at => 20)
+
+ output.rewind
+- output.read.should match /Progress: \|============= \|\r\z/
++ expect(output.read).to match /Progress: \|============= \|\r\z/
+ end
+ end
+
+@@ -474,7 +474,7 @@ describe ProgressBar::Base do
+
+ it 'displays the bar with the correct formatting' do
+ output.rewind
+- output.read.should match /Progress: \|== \|\r\z/
++ expect(output.read).to match /Progress: \|== \|\r\z/
+ end
+ end
+ end
+@@ -487,7 +487,7 @@ describe ProgressBar::Base do
+ before { progressbar.format }
+
+ it 'resets the format back to the default' do
+- progressbar.to_s.should match /^Progress: \|\s+\|\z/
++ expect(progressbar.to_s).to match /^Progress: \|\s+\|\z/
+ end
+ end
+
+@@ -495,116 +495,116 @@ describe ProgressBar::Base do
+ before { progressbar.format '%t' }
+
+ it 'sets it as the new format for the bar' do
+- progressbar.to_s.should match /^Progress\z/
++ expect(progressbar.to_s).to match /^Progress\z/
+ end
+ end
+ end
+
+ context '#to_s' do
+ it 'displays the title when passed the "%t" format flag' do
+- progressbar.to_s('%t').should match /^Progress\z/
++ expect(progressbar.to_s('%t')).to match /^Progress\z/
+ end
+
+ it 'displays the title when passed the "%T" format flag' do
+- progressbar.to_s('%T').should match /^Progress\z/
++ expect(progressbar.to_s('%T')).to match /^Progress\z/
+ end
+
+ it 'displays the bar when passed the "%B" format flag (including empty space)' do
+ progressbar = ProgressBar::Base.new(:length => 100, :starting_at => 20)
+- progressbar.to_s('%B').should match /^#{'=' * 20}#{' ' * 80}\z/
++ expect(progressbar.to_s('%B')).to match /^#{'=' * 20}#{' ' * 80}\z/
+ end
+
+ it 'displays the bar when passed the combined "%b%i" format flags' do
+ progressbar = ProgressBar::Base.new(:length => 100, :starting_at => 20)
+- progressbar.to_s('%b%i').should match /^#{'=' * 20}#{' ' * 80}\z/
++ expect(progressbar.to_s('%b%i')).to match /^#{'=' * 20}#{' ' * 80}\z/
+ end
+
+ it 'displays the bar when passed the "%b" format flag (excluding empty space)' do
+ progressbar = ProgressBar::Base.new(:length => 100, :starting_at => 20)
+- progressbar.to_s('%b').should match /^#{'=' * 20}\z/
++ expect(progressbar.to_s('%b')).to match /^#{'=' * 20}\z/
+ end
+
+ it 'displays the incomplete space when passed the "%i" format flag' do
+ progressbar = ProgressBar::Base.new(:length => 100, :starting_at => 20)
+- progressbar.to_s('%i').should match /^#{' ' * 80}\z/
++ expect(progressbar.to_s('%i')).to match /^#{' ' * 80}\z/
+ end
+
+ it 'displays the bar when passed the "%w" format flag' do
+ progressbar = ProgressBar::Base.new(:output => output, :length => 100, :starting_at => 0)
+
+- progressbar.to_s('%w').should match /^\z/
++ expect(progressbar.to_s('%w')).to match /^\z/
+ 4.times { progressbar.increment }
+- progressbar.to_s('%w').should match /^====\z/
++ expect(progressbar.to_s('%w')).to match /^====\z/
+ progressbar.increment
+- progressbar.to_s('%w').should match /^= 5 =\z/
++ expect(progressbar.to_s('%w')).to match /^= 5 =\z/
+ 5.times { progressbar.increment }
+- progressbar.to_s('%w').should match /^=== 10 ===\z/
++ expect(progressbar.to_s('%w')).to match /^=== 10 ===\z/
+ progressbar.decrement
+- progressbar.to_s('%w').should match /^=== 9 ===\z/
++ expect(progressbar.to_s('%w')).to match /^=== 9 ===\z/
+ 91.times { progressbar.increment }
+- progressbar.to_s('%w').should match /^#{'=' * 47} 100 #{'=' * 48}\z/
++ expect(progressbar.to_s('%w')).to match /^#{'=' * 47} 100 #{'=' * 48}\z/
+ end
+
+ it 'calculates the remaining negative space properly with an integrated percentage bar of 0 percent' do
+ progressbar = ProgressBar::Base.new(:output => output, :length => 100, :total => 200, :starting_at => 0)
+
+- progressbar.to_s('%w%i').should match /^\s{100}\z/
++ expect(progressbar.to_s('%w%i')).to match /^\s{100}\z/
+ 9.times { progressbar.increment }
+- progressbar.to_s('%w%i').should match /^====\s{96}\z/
++ expect(progressbar.to_s('%w%i')).to match /^====\s{96}\z/
+ progressbar.increment
+- progressbar.to_s('%w%i').should match /^= 5 =\s{95}\z/
++ expect(progressbar.to_s('%w%i')).to match /^= 5 =\s{95}\z/
+ end
+
+ it 'displays the current capacity when passed the "%c" format flag' do
+ progressbar = ProgressBar::Base.new(:output => output, :starting_at => 0)
+
+- progressbar.to_s('%c').should match /^0\z/
++ expect(progressbar.to_s('%c')).to match /^0\z/
+ progressbar.increment
+- progressbar.to_s('%c').should match /^1\z/
++ expect(progressbar.to_s('%c')).to match /^1\z/
+ progressbar.decrement
+- progressbar.to_s('%c').should match /^0\z/
++ expect(progressbar.to_s('%c')).to match /^0\z/
+ end
+
+ it 'displays the total capacity when passed the "%C" format flag' do
+ progressbar = ProgressBar::Base.new(:total => 100)
+
+- progressbar.to_s('%C').should match /^100\z/
++ expect(progressbar.to_s('%C')).to match /^100\z/
+ end
+
+ it 'displays the percentage complete when passed the "%p" format flag' do
+ progressbar = ProgressBar::Base.new(:starting_at => 33, :total => 200)
+
+- progressbar.to_s('%p').should match /^16\z/
++ expect(progressbar.to_s('%p')).to match /^16\z/
+ end
+
+ it 'displays the percentage complete when passed the "%P" format flag' do
+ progressbar = ProgressBar::Base.new(:starting_at => 33, :total => 200)
+
+- progressbar.to_s('%P').should match /^16.50\z/
++ expect(progressbar.to_s('%P')).to match /^16.50\z/
+ end
+
+ it 'displays only up to 2 decimal places when using the "%P" flag' do
+ progressbar = ProgressBar::Base.new(:starting_at => 66, :total => 99)
+
+- progressbar.to_s('%P').should match /^66.66\z/
++ expect(progressbar.to_s('%P')).to match /^66.66\z/
+ end
+
+ it 'displays a literal percent sign when using the "%%" flag' do
+ progressbar = ProgressBar::Base.new(:starting_at => 66, :total => 99)
+
+- progressbar.to_s('%%').should match /^%\z/
++ expect(progressbar.to_s('%%')).to match /^%\z/
+ end
+
+ it 'displays a literal percent sign when using the "%%" flag' do
+ progressbar = ProgressBar::Base.new(:starting_at => 66, :total => 99)
+
+- progressbar.to_s('%%').should match /^%\z/
++ expect(progressbar.to_s('%%')).to match /^%\z/
+ end
+
+ # Autostarting for now. This will be applicable later.
+ # context "when called before #start" do
+ # it "displays unknown time elapsed when using the %a flag" do
+- # progressbar.to_s('%a').should match /^Time: --:--:--\z/
++ # expect(progressbar.to_s('%a')).to match /^Time: --:--:--\z/
+ # end
+ # end
+
+@@ -619,19 +619,19 @@ describe ProgressBar::Base do
+ before { progressbar.reset }
+
+ it 'displays "??:??:??" until finished when passed the %e flag' do
+- progressbar.to_s('%a').should match /^Time: --:--:--\z/
++ expect(progressbar.to_s('%a')).to match /^Time: --:--:--\z/
+ end
+ end
+
+ it 'displays the time elapsed when using the "%a" flag' do
+- progressbar.to_s('%a').should match /^Time: 01:02:03\z/
++ expect(progressbar.to_s('%a')).to match /^Time: 01:02:03\z/
+ end
+ end
+
+ context 'when called before #start' do
+ it 'displays unknown time until finished when passed the "%e" flag' do
+ progressbar = ProgressBar::Base.new
+- progressbar.to_s('%e').should match /^ ETA: \?\?:\?\?:\?\?\z/
++ expect(progressbar.to_s('%e')).to match /^ ETA: \?\?:\?\?:\?\?\z/
+ end
+ end
+
+@@ -649,12 +649,12 @@ describe ProgressBar::Base do
+ before { progressbar.reset }
+
+ it 'displays "??:??:??" until finished when passed the "%e" flag' do
+- progressbar.to_s('%e').should match /^ ETA: \?\?:\?\?:\?\?\z/
++ expect(progressbar.to_s('%e')).to match /^ ETA: \?\?:\?\?:\?\?\z/
+ end
+ end
+
+ it 'displays the estimated time remaining when using the "%e" flag' do
+- progressbar.to_s('%e').should match /^ ETA: 01:02:03\z/
++ expect(progressbar.to_s('%e')).to match /^ ETA: 01:02:03\z/
+ end
+ end
+
+@@ -669,15 +669,15 @@ describe ProgressBar::Base do
+ end
+
+ it 'displays "> 4 Days" until finished when passed the "%E" flag' do
+- progressbar.to_s('%E').should match /^ ETA: > 4 Days\z/
++ expect(progressbar.to_s('%E')).to match /^ ETA: > 4 Days\z/
+ end
+
+ it 'displays "??:??:??" until finished when passed the "%e" flag' do
+- progressbar.to_s('%e').should match /^ ETA: \?\?:\?\?:\?\?\z/
++ expect(progressbar.to_s('%e')).to match /^ ETA: \?\?:\?\?:\?\?\z/
+ end
+
+ it 'displays the exact estimated time until finished when passed the "%f" flag' do
+- progressbar.to_s('%f').should match /^ ETA: 100:00:00\z/
++ expect(progressbar.to_s('%f')).to match /^ ETA: 100:00:00\z/
+ end
+ end
+ end
+diff --git a/spec/lib/ruby-progressbar/components/bar_spec.rb b/spec/lib/ruby-progressbar/components/bar_spec.rb
+index e960fb7..8779e91 100644
+--- a/spec/lib/ruby-progressbar/components/bar_spec.rb
++++ b/spec/lib/ruby-progressbar/components/bar_spec.rb
+@@ -7,26 +7,26 @@ describe ProgressBar::Components::Bar do
+
+ describe '#total' do
+ it 'returns the default total' do
+- @progressbar.total.should eql ProgressBar::Components::Bar::DEFAULT_TOTAL
++ expect(@progressbar.total).to eql ProgressBar::Components::Bar::DEFAULT_TOTAL
+ end
+ end
+
+ describe '#progress_mark' do
+ it 'returns the default mark' do
+- @progressbar.progress_mark.should eql ProgressBar::Components::Bar::DEFAULT_PROGRESS_MARK
++ expect(@progressbar.progress_mark).to eql ProgressBar::Components::Bar::DEFAULT_PROGRESS_MARK
+ end
+ end
+
+ describe '#remainder_mark' do
+ it 'returns the default remainder mark' do
+- @progressbar.remainder_mark.should eql ProgressBar::Components::Bar::DEFAULT_REMAINDER_MARK
++ expect(@progressbar.remainder_mark).to eql ProgressBar::Components::Bar::DEFAULT_REMAINDER_MARK
+ end
+ end
+
+ context 'and the bar has not been started' do
+ describe '#progress' do
+ it 'returns the default beginning position' do
+- @progressbar.progress.should be_zero
++ expect(@progressbar.progress).to be_zero
+ end
+ end
+ end
+@@ -36,7 +36,7 @@ describe ProgressBar::Components::Bar do
+
+ describe '#progress' do
+ it 'returns the default starting value' do
+- @progressbar.progress.should eql ProgressBar::Components::Progressable::DEFAULT_BEGINNING_POSITION
++ expect(@progressbar.progress).to eql ProgressBar::Components::Progressable::DEFAULT_BEGINNING_POSITION
+ end
+ end
+ end
+@@ -46,7 +46,7 @@ describe ProgressBar::Components::Bar do
+
+ describe '#progress' do
+ it 'returns the given starting value' do
+- @progressbar.progress.should eql 10
++ expect(@progressbar.progress).to eql 10
+ end
+ end
+ end
+@@ -57,19 +57,19 @@ describe ProgressBar::Components::Bar do
+
+ describe '#total' do
+ it 'returns the overridden total' do
+- @progressbar.total.should eql 12
++ expect(@progressbar.total).to eql 12
+ end
+ end
+
+ describe '#progress_mark' do
+ it 'returns the overridden mark' do
+- @progressbar.progress_mark.should eql 'x'
++ expect(@progressbar.progress_mark).to eql 'x'
+ end
+ end
+
+ describe '#remainder_mark' do
+ it 'returns the overridden mark' do
+- @progressbar.remainder_mark.should eql '.'
++ expect(@progressbar.remainder_mark).to eql '.'
+ end
+ end
+ end
+@@ -84,13 +84,13 @@ describe ProgressBar::Components::Bar do
+
+ describe '#percentage_completed' do
+ it 'calculates the amount' do
+- @progressbar.percentage_completed.should eql 0
++ expect(@progressbar.percentage_completed).to eql 0
+ end
+ end
+
+ describe '#to_s' do
+ it 'displays the bar with no indication of progress' do
+- @progressbar.to_s.should eql ' '
++ expect(@progressbar.to_s).to eql ' '
+ end
+ end
+ end
+@@ -106,31 +106,31 @@ describe ProgressBar::Components::Bar do
+ before { @progressbar.increment }
+
+ it 'adds to the progress amount' do
+- @progressbar.progress.should eql 1
++ expect(@progressbar.progress).to eql 1
+ end
+
+ describe '#percentage_completed' do
+ it 'calculates the amount completed' do
+- @progressbar.percentage_completed.should eql 2
++ expect(@progressbar.percentage_completed).to eql 2
+ end
+ end
+
+ describe '#to_s' do
+ it 'displays the bar with an indication of progress' do
+- @progressbar.to_s.should eql '== '
++ expect(@progressbar.to_s).to eql '== '
+ end
+ end
+ end
+
+ describe '#percentage_completed' do
+ it 'is zero' do
+- @progressbar.percentage_completed.should eql 0
++ expect(@progressbar.percentage_completed).to eql 0
+ end
+ end
+
+ describe '#to_s' do
+ it 'displays the bar with no indication of progress' do
+- @progressbar.to_s.should eql ' '
++ expect(@progressbar.to_s).to eql ' '
+ end
+ end
+ end
+@@ -144,13 +144,13 @@ describe ProgressBar::Components::Bar do
+
+ describe '#percentage_completed' do
+ it 'always rounds down' do
+- @progressbar.percentage_completed.should eql 0
++ expect(@progressbar.percentage_completed).to eql 0
+ end
+ end
+
+ describe '#to_s' do
+ it 'displays the bar with no indication of progress' do
+- @progressbar.to_s.should eql ' '
++ expect(@progressbar.to_s).to eql ' '
+ end
+ end
+ end
+@@ -166,13 +166,13 @@ describe ProgressBar::Components::Bar do
+ before { @progressbar.increment }
+
+ it 'does not increment past the total' do
+- @progressbar.progress.should eql 50
+- @progressbar.percentage_completed.should eql 100
++ expect(@progressbar.progress).to eql 50
++ expect(@progressbar.percentage_completed).to eql 100
+ end
+
+ describe '#to_s' do
+ it 'displays the bar as 100% complete' do
+- @progressbar.to_s.should eql '=' * 100
++ expect(@progressbar.to_s).to eql '=' * 100
+ end
+ end
+ end
+@@ -181,20 +181,20 @@ describe ProgressBar::Components::Bar do
+ before { @progressbar.decrement }
+
+ it 'removes some progress from the bar' do
+- @progressbar.progress.should eql 49
+- @progressbar.percentage_completed.should eql 98
++ expect(@progressbar.progress).to eql 49
++ expect(@progressbar.percentage_completed).to eql 98
+ end
+
+ describe '#to_s' do
+ it 'displays the bar as 98% complete' do
+- @progressbar.to_s.should eql "#{'=' * 98} "
++ expect(@progressbar.to_s).to eql "#{'=' * 98} "
+ end
+ end
+ end
+
+ describe '#to_s' do
+ it 'displays the bar as 100% complete' do
+- @progressbar.to_s.should eql ('=' * 100)
++ expect(@progressbar.to_s).to eql ('=' * 100)
+ end
+ end
+ end
+@@ -203,7 +203,7 @@ describe ProgressBar::Components::Bar do
+ describe '#new' do
+ it 'raises an error' do
+ @progressbar = ProgressBar::Components::Bar.new(:total => 10)
+- lambda { @progressbar.start :at => 11 }.should raise_error(ProgressBar::InvalidProgressError, "You can't set the item's current value to be greater than the total.")
++ expect { @progressbar.start :at => 11 }.to raise_error(ProgressBar::InvalidProgressError, "You can't set the item's current value to be greater than the total.")
+ end
+ end
+ end
+diff --git a/spec/lib/ruby-progressbar/components/elapsed_timer_spec.rb b/spec/lib/ruby-progressbar/components/elapsed_timer_spec.rb
+index f96c03a..9b15976 100644
+--- a/spec/lib/ruby-progressbar/components/elapsed_timer_spec.rb
++++ b/spec/lib/ruby-progressbar/components/elapsed_timer_spec.rb
+@@ -6,14 +6,14 @@ describe ProgressBar::Components::ElapsedTimer do
+ describe '#to_s' do
+ context 'when the timer has not been started' do
+ it 'displays "Time: --:--:--"' do
+- @timer.to_s.should eql 'Time: --:--:--'
++ expect(@timer.to_s).to eql 'Time: --:--:--'
+ end
+ end
+
+ context 'when it has just been started' do
+ it 'displays "Time: 00:00:00"' do
+ @timer.start
+- @timer.to_s.should eql 'Time: 00:00:00'
++ expect(@timer.to_s).to eql 'Time: 00:00:00'
+ end
+ end
+
+@@ -35,12 +35,12 @@ describe ProgressBar::Components::ElapsedTimer do
+ before { @timer.reset }
+
+ it 'displays "Time: --:--:--"' do
+- @timer.to_s.should eql 'Time: --:--:--'
++ expect(@timer.to_s).to eql 'Time: --:--:--'
+ end
+ end
+
+ it 'displays "Time: 04:27:41"' do
+- @timer.to_s.should eql 'Time: 04:27:41'
++ expect(@timer.to_s).to eql 'Time: 04:27:41'
+ end
+ end
+
+@@ -48,12 +48,12 @@ describe ProgressBar::Components::ElapsedTimer do
+ before { @timer.reset }
+
+ it 'displays "Time: --:--:--"' do
+- @timer.to_s.should eql 'Time: --:--:--'
++ expect(@timer.to_s).to eql 'Time: --:--:--'
+ end
+ end
+
+ it 'displays "Time: 04:28:13"' do
+- @timer.to_s.should eql 'Time: 04:28:13'
++ expect(@timer.to_s).to eql 'Time: 04:28:13'
+ end
+ end
+ end
+@@ -69,7 +69,7 @@ describe ProgressBar::Components::ElapsedTimer do
+ before { @timer.start }
+
+ it 'is false' do
+- @timer.should_not be_stopped
++ expect(@timer).to_not be_stopped
+ end
+ end
+ end
+@@ -77,14 +77,14 @@ describe ProgressBar::Components::ElapsedTimer do
+
+ context "when the timer has yet to be started" do
+ it 'is false' do
+- @timer.should_not be_stopped
++ expect(@timer).to_not be_stopped
+ end
+ end
+
+ context "when the timer is stopped without having been started" do
+ before { @timer.stop }
+ it 'is false' do
+- @timer.should_not be_stopped
++ expect(@timer).to_not be_stopped
+ end
+ end
+ end
+diff --git a/spec/lib/ruby-progressbar/components/estimated_timer_spec.rb b/spec/lib/ruby-progressbar/components/estimated_timer_spec.rb
+index 7311c20..6001665 100644
+--- a/spec/lib/ruby-progressbar/components/estimated_timer_spec.rb
++++ b/spec/lib/ruby-progressbar/components/estimated_timer_spec.rb
+@@ -4,7 +4,7 @@ describe ProgressBar::Components::EstimatedTimer do
+ describe '#progress=' do
+ it 'raises an error when passed a number larger than the total' do
+ @estimated_time = ProgressBar::Components::EstimatedTimer.new(:total => 100)
+- lambda{ @estimated_time.progress = 101 }.should raise_error(ProgressBar::InvalidProgressError, "You can't set the item's current value to be greater than the total.")
++ expect{ @estimated_time.progress = 101 }.to raise_error(ProgressBar::InvalidProgressError, "You can't set the item's current value to be greater than the total.")
+ end
+ end
+
+@@ -16,13 +16,13 @@ describe ProgressBar::Components::EstimatedTimer do
+ end
+
+ it 'displays an unknown time remaining' do
+- @estimated_time.to_s.should eql ' ETA: ??:??:??'
++ expect(@estimated_time.to_s).to eql ' ETA: ??:??:??'
+ end
+
+ context 'and it is incremented' do
+ it 'should not display unknown time remaining' do
+ @estimated_time.increment
+- @estimated_time.to_s.should_not eql ' ETA: ??:??:??'
++ expect(@estimated_time.to_s).to_not eql ' ETA: ??:??:??'
+ end
+ end
+ end
+@@ -45,7 +45,7 @@ describe ProgressBar::Components::EstimatedTimer do
+ before { 20.times { @estimated_time.decrement } }
+
+ it 'displays the correct time remaining' do
+- @estimated_time.to_s.should eql ' ETA: 08:38:28'
++ expect(@estimated_time.to_s).to eql ' ETA: 08:38:28'
+ end
+ end
+
+@@ -53,12 +53,12 @@ describe ProgressBar::Components::EstimatedTimer do
+ before { @estimated_time.reset }
+
+ it 'displays unknown time remaining' do
+- @estimated_time.to_s.should eql ' ETA: ??:??:??'
++ expect(@estimated_time.to_s).to eql ' ETA: ??:??:??'
+ end
+ end
+
+ it 'displays the correct time remaining' do
+- @estimated_time.to_s.should eql ' ETA: 03:42:12'
++ expect(@estimated_time.to_s).to eql ' ETA: 03:42:12'
+ end
+ end
+
+@@ -76,7 +76,7 @@ describe ProgressBar::Components::EstimatedTimer do
+ before { @estimated_time.out_of_bounds_time_format = :friendly }
+
+ it 'displays "> 4 Days" remaining' do
+- @estimated_time.to_s.should eql ' ETA: > 4 Days'
++ expect(@estimated_time.to_s).to eql ' ETA: > 4 Days'
+ end
+ end
+
+@@ -84,12 +84,12 @@ describe ProgressBar::Components::EstimatedTimer do
+ before { @estimated_time.out_of_bounds_time_format = :unknown }
+
+ it 'displays "??:??:??" remaining' do
+- @estimated_time.to_s.should eql ' ETA: ??:??:??'
++ expect(@estimated_time.to_s).to eql ' ETA: ??:??:??'
+ end
+ end
+
+ it 'displays the correct time remaining' do
+- @estimated_time.to_s.should eql ' ETA: 100:00:00'
++ expect(@estimated_time.to_s).to eql ' ETA: 100:00:00'
+ end
+ end
+ end
+@@ -111,7 +111,7 @@ describe ProgressBar::Components::EstimatedTimer do
+ before { 20.times { @estimated_time.decrement } }
+
+ it 'displays the correct time remaining' do
+- @estimated_time.to_s.should eql ' ETA: 08:14:34'
++ expect(@estimated_time.to_s).to eql ' ETA: 08:14:34'
+ end
+ end
+
+@@ -119,12 +119,12 @@ describe ProgressBar::Components::EstimatedTimer do
+ before { @estimated_time.reset }
+
+ it 'displays unknown time remaining' do
+- @estimated_time.to_s.should eql ' ETA: ??:??:??'
++ expect(@estimated_time.to_s).to eql ' ETA: ??:??:??'
+ end
+ end
+
+ it 'displays the correct time remaining' do
+- @estimated_time.to_s.should eql ' ETA: 03:51:16'
++ expect(@estimated_time.to_s).to eql ' ETA: 03:51:16'
+ end
+ end
+
+@@ -142,7 +142,7 @@ describe ProgressBar::Components::EstimatedTimer do
+ before { @estimated_time.out_of_bounds_time_format = :friendly }
+
+ it 'displays "> 4 Days" remaining' do
+- @estimated_time.to_s.should eql ' ETA: > 4 Days'
++ expect(@estimated_time.to_s).to eql ' ETA: > 4 Days'
+ end
+ end
+
+@@ -150,12 +150,12 @@ describe ProgressBar::Components::EstimatedTimer do
+ before { @estimated_time.out_of_bounds_time_format = :unknown }
+
+ it 'displays "??:??:??" remaining' do
+- @estimated_time.to_s.should eql ' ETA: ??:??:??'
++ expect(@estimated_time.to_s).to eql ' ETA: ??:??:??'
+ end
+ end
+
+ it 'displays the correct time remaining' do
+- @estimated_time.to_s.should eql ' ETA: 105:33:20'
++ expect(@estimated_time.to_s).to eql ' ETA: 105:33:20'
+ end
+ end
+ end
+@@ -172,7 +172,7 @@ describe ProgressBar::Components::EstimatedTimer do
+ estimated_time.increment
+ estimated_time.to_s
+ end
+- results.should == [
++ expect(results).to eq [
+ ' ETA: 00:00:05',
+ ' ETA: 00:00:04',
+ ' ETA: 00:00:04',
+@@ -194,7 +194,7 @@ describe ProgressBar::Components::EstimatedTimer do
+ context 'when set to an invalid format' do
+ it 'raises an exception' do
+ @estimated_time = ProgressBar::Components::EstimatedTimer.new(:total => 100)
+- lambda{ @estimated_time.out_of_bounds_time_format = :foo }.should raise_error('Invalid Out Of Bounds time format. Valid formats are [:unknown, :friendly, nil]')
++ expect{ @estimated_time.out_of_bounds_time_format = :foo }.to raise_error('Invalid Out Of Bounds time format. Valid formats are [:unknown, :friendly, nil]')
+ end
+ end
+ end
+diff --git a/spec/lib/ruby-progressbar/components/progressable_spec.rb b/spec/lib/ruby-progressbar/components/progressable_spec.rb
+index 453a841..730e802 100644
+--- a/spec/lib/ruby-progressbar/components/progressable_spec.rb
++++ b/spec/lib/ruby-progressbar/components/progressable_spec.rb
+@@ -11,20 +11,20 @@ describe ProgressBar::Components::Progressable do
+ it 'is always reset when the progressable is started' do
+ subject.running_average = 10
+ subject.start :at => 0
+- subject.running_average.should be_zero
++ expect(subject.running_average).to be_zero
+
+ subject.start :at => 40
+- subject.running_average.should eql 36.0
++ expect(subject.running_average).to eql 36.0
+ end
+ end
+
+ describe '#smoothing' do
+ it 'can be passed in as an option to the initializer' do
+- ProgressableClass.new(:smoothing => 0.3).smoothing.should eql 0.3
++ expect(ProgressableClass.new(:smoothing => 0.3).smoothing).to eql 0.3
+ end
+
+ it 'does not have to be passed in as an option to the initializer' do
+- ProgressableClass.new.smoothing.should eql 0.1
++ expect(ProgressableClass.new.smoothing).to eql 0.1
+ end
+ end
+
+@@ -32,7 +32,7 @@ describe ProgressBar::Components::Progressable do
+ it 'returns the default total if total is zero' do
+ subject.total = 0
+
+- subject.percentage_completed.should eql 100
++ expect(subject.percentage_completed).to eql 100
+ end
+ end
+ end
+diff --git a/spec/lib/ruby-progressbar/components/throttle_spec.rb b/spec/lib/ruby-progressbar/components/throttle_spec.rb
+index 5aab0fb..e20f2e9 100644
+--- a/spec/lib/ruby-progressbar/components/throttle_spec.rb
++++ b/spec/lib/ruby-progressbar/components/throttle_spec.rb
+@@ -15,7 +15,7 @@ describe ProgressBar::Components::Throttle do
+
+ @throttle.choke { yielded = true }
+
+- yielded.should be_true
++ expect(yielded).to be_truthy
+ end
+
+ context 'after initial yield' do
+@@ -29,7 +29,7 @@ describe ProgressBar::Components::Throttle do
+ (1..9).each do |t|
+ Timecop.freeze(t) { @throttle.choke { yielded = true } }
+
+- yielded.should be_false
++ expect(yielded).to be_falsey
+ end
+ end
+
+@@ -39,7 +39,7 @@ describe ProgressBar::Components::Throttle do
+ (0..25).each do |t|
+ Timecop.freeze(t) { @throttle.choke(true) { yielded += 1 } }
+
+- yielded.should == t
++ expect(yielded).to eq t
+ end
+ end
+
+@@ -48,7 +48,7 @@ describe ProgressBar::Components::Throttle do
+
+ Timecop.freeze(15) { @throttle.choke { yielded = true } }
+
+- yielded.should be_true
++ expect(yielded).to be_truthy
+ end
+ end
+
+@@ -64,7 +64,7 @@ describe ProgressBar::Components::Throttle do
+ (16..24).each do |t|
+ Timecop.freeze(t) { @throttle.choke { yielded = true } }
+
+- yielded.should be_false
++ expect(yielded).to be_falsey
+ end
+ end
+
+@@ -73,7 +73,7 @@ describe ProgressBar::Components::Throttle do
+
+ Timecop.freeze(25) { @throttle.choke { yielded = true } }
+
+- yielded.should be_true
++ expect(yielded).to be_truthy
+ end
+ end
+ end
+@@ -93,7 +93,7 @@ describe ProgressBar::Components::Throttle do
+ (0..25).each do |t|
+ Timecop.freeze(t) { @throttle.choke { yielded += 1 } }
+
+- yielded.should == t
++ expect(yielded).to eq t
+ end
+ end
+ end
+diff --git a/spec/lib/ruby-progressbar/format/molecule_spec.rb b/spec/lib/ruby-progressbar/format/molecule_spec.rb
+index 316ee87..fe02710 100644
+--- a/spec/lib/ruby-progressbar/format/molecule_spec.rb
++++ b/spec/lib/ruby-progressbar/format/molecule_spec.rb
+@@ -5,18 +5,18 @@ describe ProgressBar::Format::Molecule do
+ before { @molecule = ProgressBar::Format::Molecule.new('e') }
+
+ it 'sets the key when initialized' do
+- @molecule.key.should eql 'e'
++ expect(@molecule.key).to eql 'e'
+ end
+
+ it 'sets the method name when initialized' do
+- @molecule.method_name.should eql :estimated_time_with_unknown_oob
++ expect(@molecule.method_name).to eql :estimated_time_with_unknown_oob
+ end
+ end
+
+ describe '#bar_molecule?' do
+ it "is true if the molecule's key is a representation of the progress bar graphic" do
+ molecule = ProgressBar::Format::Molecule.new('B')
+- molecule.should be_bar_molecule
++ expect(molecule).to be_bar_molecule
+ end
+ end
+ end
+diff --git a/spec/lib/ruby-progressbar/running_average_calculator_spec.rb b/spec/lib/ruby-progressbar/running_average_calculator_spec.rb
+index a925c25..61bcce5 100644
+--- a/spec/lib/ruby-progressbar/running_average_calculator_spec.rb
++++ b/spec/lib/ruby-progressbar/running_average_calculator_spec.rb
+@@ -3,9 +3,9 @@ require 'spec_helper'
+ describe ProgressBar::RunningAverageCalculator do
+ describe '.calculate' do
+ it 'calculates properly' do
+- ProgressBar::RunningAverageCalculator.calculate(4.5, 12, 0.1).should be_within(0.001).of 11.25
+- ProgressBar::RunningAverageCalculator.calculate(8.2, 51, 0.7).should be_within(0.001).of 21.04
+- ProgressBar::RunningAverageCalculator.calculate(41.8, 100, 0.59).should be_within(0.001).of 65.662
++ expect(ProgressBar::RunningAverageCalculator.calculate(4.5, 12, 0.1)).to be_within(0.001).of 11.25
++ expect(ProgressBar::RunningAverageCalculator.calculate(8.2, 51, 0.7)).to be_within(0.001).of 21.04
++ expect(ProgressBar::RunningAverageCalculator.calculate(41.8, 100, 0.59)).to be_within(0.001).of 65.662
+ end
+ end
+ end
+diff --git a/spec/lib/ruby-progressbar/time_spec.rb b/spec/lib/ruby-progressbar/time_spec.rb
+index d073994..ef55146 100644
+--- a/spec/lib/ruby-progressbar/time_spec.rb
++++ b/spec/lib/ruby-progressbar/time_spec.rb
+@@ -20,8 +20,8 @@ describe ProgressBar::Time do
+ subject { ProgressBar::Time.now ::TimeMockedWithTimecop }
+
+ it 'retrieves the unmocked Timecop time' do
+- ::TimeMockedWithTimecop.should_receive(:now_without_mock_time).once
+- ::TimeMockedWithTimecop.should_not_receive(:now)
++ expect(::TimeMockedWithTimecop).to receive(:now_without_mock_time).once
++ expect(::TimeMockedWithTimecop).not_to receive(:now)
+
+ subject
+ end
+@@ -31,8 +31,8 @@ describe ProgressBar::Time do
+ subject { ProgressBar::Time.now ::TimeMockedWithDelorean }
+
+ it 'retrieves the unmocked Delorean time' do
+- ::TimeMockedWithDelorean.should_receive(:now_without_delorean).once
+- ::TimeMockedWithDelorean.should_not_receive(:now)
++ expect(::TimeMockedWithDelorean).to receive(:now_without_delorean).once
++ expect(::TimeMockedWithDelorean).not_to receive(:now)
+
+ subject
+ end
+@@ -42,7 +42,7 @@ describe ProgressBar::Time do
+ subject { ProgressBar::Time.now ::UnmockedTime }
+
+ it 'will return the actual time' do
+- ::UnmockedTime.should_receive(:now).once
++ expect(::UnmockedTime).to receive(:now).once
+
+ subject
+ end
diff --git a/debian/patches/series b/debian/patches/series
new file mode 100644
index 0000000..2578167
--- /dev/null
+++ b/debian/patches/series
@@ -0,0 +1 @@
+0001-Make-spec-RSpec3-compatible.patch
--
Alioth's /usr/local/bin/git-commit-notice on /srv/git.debian.org/git/pkg-ruby-extras/ruby-progressbar.git
More information about the Pkg-ruby-extras-commits
mailing list