'No backend type is specified. Fall back to :exec type.'が大量に出てくる場合の対処法

test-kitchenでchefrepoのテストを仮想マシン上で行っている時にちょっと気持ち悪い警告がいっぱいでました。

```bash:
$ kitchen verify
-----> Starting Kitchen (v1.3.1)
-----> Verifying <default-ubuntu-1410>...
       Removing /tmp/busser/suites/serverspec
       Uploading /tmp/busser/suites/serverspec/base_spec.rb (mode=0644)
-----> Running serverspec test suite
       /opt/chef/embedded/bin/ruby -I/tmp/busser/suites/serverspec -I/tmp/busser/gems/gems/rspec-support-3.2.2/lib:/tmp/busser/gems/gems/rspec-core-3.2.2/lib /opt/chef/embedded/bin/rspec --pattern /tmp/busser/suites/serverspec/\*\*/\*_spec.rb --color --format documentation --default-path /tmp/busser/suites/serverspec

       Command "getenforce"
         stdout
       No backend type is specified. Fall back to :exec type.
       No backend type is specified. Fall back to :exec type.
       No backend type is specified. Fall back to :exec type.
       No backend type is specified. Fall back to :exec type.
       No backend type is specified. Fall back to :exec type.
       No backend type is specified. Fall back to :exec type.
       No backend type is specified. Fall back to :exec type.
       No backend type is specified. Fall back to :exec type.
       No backend type is specified. Fall back to :exec type.
       No backend type is specified. Fall back to :exec type.
       No backend type is specified. Fall back to :exec type.
       No backend type is specified. Fall back to :exec type.
       No backend type is specified. Fall back to :exec type.
       No backend type is specified. Fall back to :exec type.
       No backend type is specified. Fall back to :exec type.
       No backend type is specified. Fall back to :exec type.
           should match "Disabled"

       Finished in 0.11633 seconds (files took 0.30969 seconds to load)
       1 example, 0 failures

       Finished verifying <default-ubuntu-1410> (0m1.87s).
```

`No backend type is specified. Fall back to :exec type.`がたくさん出てくる。この場合のbackend typeというのは`serverspec-init`コマンドで初期設定を行うときに聞かれるあのbackend type。「SSHとEXECのどっちにする？」と聞かれたと思います。

```
$ serverspec-init
Select OS type:

  1) UN*X
  2) Windows

Select number: 1

Select a backend type:

  1) SSH
  2) Exec (local)

Select number:
```

これはテストするサーバーで指定してやらないといけないようなのだけれど、`kitchen login`して手動で`serverspec-init`するのは、test-kitchenの仮想マシンについて意識しなくていいスタイルに反する・・・。

これはテストコードの頭に`set :backend, :exec`という書き方で指定してやれば解決できるようです。SSHを指定したい場合は`set :backend, :ssh`ですが、test-kitchenの場合はおそらく仮想マシンにログインしてからrake spec?しているようなのでうまくいかない。execが正解。

```ruby:serverspecのテストコード
require 'serverspec'
set :backend, :exec

describe command("getenforce") do
    its(:stdout) { should match 'Disabled' }
end
```

これで出力から無駄なものがなくなりました。めでたしめでたし。

```bash:
$ kitchen verify
-----> Starting Kitchen (v1.3.1)
-----> Verifying <default-ubuntu-1410>...
       Removing /tmp/busser/suites/serverspec
       Uploading /tmp/busser/suites/serverspec/base_spec.rb (mode=0644)
-----> Running serverspec test suite
       /opt/chef/embedded/bin/ruby -I/tmp/busser/suites/serverspec -I/tmp/busser/gems/gems/rspec-support-3.2.2/lib:/tmp/busser/gems/gems/rspec-core-3.2.2/lib /opt/chef/embedded/bin/rspec --pattern /tmp/busser/suites/serverspec/\*\*/\*_spec.rb --color --format documentation --default-path /tmp/busser/suites/serverspec

       Command "getenforce"
         stdout
           should match "Disabled"

       Finished in 0.07994 seconds (files took 0.28063 seconds to load)
       1 example, 0 failures

       Finished verifying <default-ubuntu-1410> (0m1.58s).
-----> Verifying <default-centos-66>...
       Removing /tmp/busser/suites/serverspec
       Uploading /tmp/busser/suites/serverspec/base_spec.rb (mode=0644)
-----> Running serverspec test suite
       /opt/chef/embedded/bin/ruby -I/tmp/busser/suites/serverspec -I/tmp/busser/gems/gems/rspec-support-3.2.2/lib:/tmp/busser/gems/gems/rspec-core-3.2.2/lib /opt/chef/embedded/bin/rspec --pattern /tmp/busser/suites/serverspec/\*\*/\*_spec.rb --color --format documentation --default-path /tmp/busser/suites/serverspec

       Command "getenforce"
         stdout
           should match "Disabled"

       Finished in 0.02523 seconds (files took 0.26327 seconds to load)
       1 example, 0 failures

       Finished verifying <default-centos-66> (0m1.52s).
-----> Kitchen is finished. (0m4.35s)
```