spec/unit/printer_spec.rb in lhm-2.1.0 vs spec/unit/printer_spec.rb in lhm-2.2.0
- old
+ new
@@ -3,17 +3,17 @@
require 'lhm/printer'
describe Lhm::Printer do
include UnitHelper
- describe "percentage printer" do
+ describe 'percentage printer' do
before(:each) do
@printer = Lhm::Printer::Percentage.new
end
- it "prints the percentage" do
+ it 'prints the percentage' do
mock = MiniTest::Mock.new
10.times do |i|
mock.expect(:write, :return_value) do |message|
assert_match /^\r/, message.first
assert_match /#{i}\/10/, message.first
@@ -23,11 +23,11 @@
@printer.instance_variable_set(:@output, mock)
10.times { |i| @printer.notify(i, 10) }
mock.verify
end
- it "always print a bigger message" do
+ it 'always print a bigger message' do
@length = 0
mock = MiniTest::Mock.new
3.times do |i|
mock.expect(:write, :return_value) do |message|
assert message.first.length >= @length
@@ -43,11 +43,11 @@
@printer.notify(0, nil)
mock.verify
end
- it "prints the end message" do
+ it 'prints the end message' do
mock = MiniTest::Mock.new
mock.expect(:write, :return_value, [String])
mock.expect(:write, :return_value, ["\n"])
@printer.instance_variable_set(:@output, mock)
@@ -55,19 +55,19 @@
mock.verify
end
end
- describe "dot printer" do
+ describe 'dot printer' do
before(:each) do
@printer = Lhm::Printer::Dot.new
end
- it "prints the dots" do
+ it 'prints the dots' do
mock = MiniTest::Mock.new
10.times do
- mock.expect(:write, :return_value, ["."])
+ mock.expect(:write, :return_value, ['.'])
end
@printer.instance_variable_set(:@output, mock)
10.times { @printer.notify }