spec/signore/executable_spec.rb in signore-0.2.0 vs spec/signore/executable_spec.rb in signore-0.2.1

- old
+ new

@@ -14,11 +14,11 @@ end.last.must_include 'usage: signore prego|pronto [tag, …]' end it 'loads the signature database from the specified location' do db_factory = MiniTest::Mock.new.expect :new, nil, ['signatures.yml'] - Executable.new %w[-d signatures.yml prego], db_factory: db_factory + Executable.new %w(-d signatures.yml prego), db_factory: db_factory db_factory.verify end it 'defaults to ~/.local/share/signore/signatures.yml' do begin @@ -49,19 +49,19 @@ end describe '#run' do describe 'prego' do it 'prints a signature tagged with the provided tags' do - args = %w[-d spec/fixtures/signatures.yml prego tech programming] + args = %w(-d spec/fixtures/signatures.yml prego tech programming) output = "// sometimes I believe compiler ignores all my comments\n" stdout = capture_io { Executable.new(args).run }.first stdout.must_equal output end it 'prints a signature based on allowed and forbidden tags' do path = 'spec/fixtures/signatures.yml' - args = %W[-d #{path} prego ~programming tech ~security] + args = %W(-d #{path} prego ~programming tech ~security) out = capture_io { Executable.new(args).run }.first out.must_equal <<-end.dedent You do have to be mad to work here, but it doesn’t help. [Gary Barnes, asr] end @@ -79,11 +79,11 @@ Mark Pilgrim\n\n\n end capture_io do - args = %W[-d #{@file.path} pronto Wikipedia ADHD] + args = %W(-d #{@file.path} pronto Wikipedia ADHD) Executable.new(args).run input: input end.first.must_equal <<-end.dedent text? author? subject? @@ -91,10 +91,10 @@ The Wikipedia page on ADHD is like 20 pages long. That’s just cruel. [Mark Pilgrim] end capture_io do - Executable.new(%W[-d #{@file.path} prego Wikipedia ADHD]).run + Executable.new(%W(-d #{@file.path} prego Wikipedia ADHD)).run end.first.must_equal <<-end.dedent The Wikipedia page on ADHD is like 20 pages long. That’s just cruel. [Mark Pilgrim] end end