test/test_layout.rb in pdfmult-1.3.2 vs test/test_layout.rb in pdfmult-1.4.0

- old
+ new

@@ -1,57 +1,54 @@ -# test_layout.rb: Unit tests for the pdfmult script. -# -# Copyright (C) 2011-2013 Marcus Stollsteimer +# frozen_string_literal: true -require 'minitest/spec' -require 'minitest/autorun' -require 'pdfmult' +require "minitest/autorun" +require "pdfmult" describe Pdfmult::Layout do before do @layout = Pdfmult::Layout.new(2) end - it 'can return the number of pages' do - @layout.pages.must_equal 2 + it "can return the number of pages" do + _(@layout.pages).must_equal 2 end - it 'can return the geometry' do - @layout.geometry.must_equal '2x1' + it "can return the geometry" do + _(@layout.geometry).must_equal "2x1" end - it 'knows whether it is landscape' do - @layout.landscape?.must_equal true + it "knows whether it is landscape" do + _(@layout.landscape?).must_equal true end - it 'returns the correct layout for 2 pages' do + it "returns the correct layout for 2 pages" do layout = Pdfmult::Layout.new(2) - layout.geometry.must_equal '2x1' - layout.landscape?.must_equal true + _(layout.geometry).must_equal "2x1" + _(layout.landscape?).must_equal true end - it 'returns the correct layout for 4 pages' do + it "returns the correct layout for 4 pages" do layout = Pdfmult::Layout.new(4) - layout.geometry.must_equal '2x2' - layout.landscape?.must_equal false + _(layout.geometry).must_equal "2x2" + _(layout.landscape?).must_equal false end - it 'returns the correct layout for 8 pages' do + it "returns the correct layout for 8 pages" do layout = Pdfmult::Layout.new(8) - layout.geometry.must_equal '4x2' - layout.landscape?.must_equal true + _(layout.geometry).must_equal "4x2" + _(layout.landscape?).must_equal true end - it 'returns the correct layout for 9 pages' do + it "returns the correct layout for 9 pages" do layout = Pdfmult::Layout.new(9) - layout.geometry.must_equal '3x3' - layout.landscape?.must_equal false + _(layout.geometry).must_equal "3x3" + _(layout.landscape?).must_equal false end - it 'returns the correct layout for 16 pages' do + it "returns the correct layout for 16 pages" do layout = Pdfmult::Layout.new(16) - layout.geometry.must_equal '4x4' - layout.landscape?.must_equal false + _(layout.geometry).must_equal "4x4" + _(layout.landscape?).must_equal false end end