test/commands/test_prot2pept.rb in unipept-1.4.0 vs test/commands/test_prot2pept.rb in unipept-1.4.1
- old
+ new
@@ -2,50 +2,50 @@
module Unipept
class Prot2peptTestCase < Unipept::TestCase
def test_normal_input
out, _err = capture_io_with_input('AALTERAALTERPAALTER') do
- Commands::Prot2pept.run(%w())
+ Commands::Prot2pept.run(%w[])
end
assert_equal("AALTER\nAALTERPAALTER", out.chomp)
out, _err = capture_io_with_input('AALTERAAL*TERPAALTER') do
- Commands::Prot2pept.run(%w())
+ Commands::Prot2pept.run(%w[])
end
assert_equal("AALTER\nAAL\nTERPAALTER", out.chomp)
out, _err = capture_io_with_input('KRKPR') do
- Commands::Prot2pept.run(%w())
+ Commands::Prot2pept.run(%w[])
end
assert_equal("K\nR\nKPR", out.chomp)
- out, _err = capture_io_with_input(%w(AALTERAALTERPAALTER AALTERAA)) do
- Commands::Prot2pept.run(%w())
+ out, _err = capture_io_with_input(%w[AALTERAALTERPAALTER AALTERAA]) do
+ Commands::Prot2pept.run(%w[])
end
assert_equal("AALTER\nAALTERPAALTER\nAALTER\nAA", out.chomp)
end
def test_fasta_input
out, _err = capture_io_with_input(">AKA\nAALTERAALTERPAALTER") do
- Commands::Prot2pept.run(%w())
+ Commands::Prot2pept.run(%w[])
end
assert_equal(">AKA\nAALTER\nAALTERPAALTER", out.chomp)
out, _err = capture_io_with_input(">AKA\nAAL\nT\nERAALTER\nP\nAALTER") do
- Commands::Prot2pept.run(%w())
+ Commands::Prot2pept.run(%w[])
end
assert_equal(">AKA\nAALTER\nAALTERPAALTER", out.chomp)
out, _err = capture_io_with_input(">AKA\nAAL\nT\n>\nERAALTER\nP\nAALTER") do
- Commands::Prot2pept.run(%w())
+ Commands::Prot2pept.run(%w[])
end
assert_equal(">AKA\nAALT\n>\nER\nAALTERPAALTER", out.chomp)
end
def test_default_pattern
default_out, _err = capture_io_with_input('AALTERAALTERPAALTER') do
- Commands::Prot2pept.run(%w())
+ Commands::Prot2pept.run(%w[])
end
assert_equal("AALTER\nAALTERPAALTER", default_out.chomp)
pattern_out, _err = capture_io_with_input('AALTERAALTERPAALTER') do
Commands::Prot2pept.run(['-p', '([KR])([^P])'])
@@ -58,11 +58,11 @@
assert_equal(default_out, pattern_out)
end
def test_pattern
out, _err = capture_io_with_input('AALTERAALTERPAALTER') do
- Commands::Prot2pept.run(%w())
+ Commands::Prot2pept.run(%w[])
end
assert_equal("AALTER\nAALTERPAALTER", out.chomp)
out, _err = capture_io_with_input('AALTERAALTERPAALTER') do
Commands::Prot2pept.run(%w(-p ([KR])([^A])))
@@ -76,10 +76,10 @@
end
def test_help
out, _err = capture_io_while do
assert_raises SystemExit do
- Commands::Prot2pept.run(%w(-h))
+ Commands::Prot2pept.run(%w[-h])
end
end
assert(out.include?('show help for this command'))
end
end