From e1402a16d94e8a8eff62ac23c089c8ffd5488ffe Mon Sep 17 00:00:00 2001 From: Christoph Hartmann Date: Sat, 2 Jan 2016 23:59:22 +0100 Subject: [PATCH] split integration tests for mount --- test/integration/test/integration/default/file_spec.rb | 9 +-------- test/integration/test/integration/default/mount_spec.rb | 9 +++++++++ 2 files changed, 10 insertions(+), 8 deletions(-) create mode 100644 test/integration/test/integration/default/mount_spec.rb diff --git a/test/integration/test/integration/default/file_spec.rb b/test/integration/test/integration/default/file_spec.rb index 4f1a423ec..a049e62b3 100644 --- a/test/integration/test/integration/default/file_spec.rb +++ b/test/integration/test/integration/default/file_spec.rb @@ -121,6 +121,7 @@ if os.unix? end # compare with exact match + # also see mount_spec.rb describe file('/mnt/iso-disk') do it { should be_mounted.only_with( { :device=>"/root/alpine-3.3.0-x86_64.iso", @@ -131,14 +132,6 @@ if os.unix? } end - # instead of `.with` or `.only_with` we recommend to use the `mount` resource - describe mount '/mnt/iso-disk' do - it { should be_mounted } - its('device') { should eq '/root/alpine-3.3.0-x86_64.iso' } - its('type') { should eq 'iso9660' } - its('options') { should eq ['ro'] } - end - elsif os.windows? describe file('C:\\Windows') do it { should exist } diff --git a/test/integration/test/integration/default/mount_spec.rb b/test/integration/test/integration/default/mount_spec.rb new file mode 100644 index 000000000..628c1dc99 --- /dev/null +++ b/test/integration/test/integration/default/mount_spec.rb @@ -0,0 +1,9 @@ +# encoding: utf-8 + +# instead of `.with` or `.only_with` we recommend to use the `mount` resource +describe mount '/mnt/iso-disk' do + it { should be_mounted } + its('device') { should eq '/root/alpine-3.3.0-x86_64.iso' } + its('type') { should eq 'iso9660' } + its('options') { should eq ['ro'] } +end