spec/integration/default_spec.rb in itamae-1.9.9 vs spec/integration/default_spec.rb in itamae-1.9.10

- old
+ new

@@ -55,10 +55,17 @@ it { should be_file } its(:content) { should match(/Hello World/) } it { should be_mode 777 } end +describe file('/tmp/file_with_suid') do + it { should be_file } + it { should be_mode 4755 } + it { should be_owned_by "itamae" } + it { should be_grouped_into "itamae" } +end + describe file('/tmp/execute') do it { should be_file } its(:content) { should match(/Hello Execute/) } end @@ -139,18 +146,30 @@ describe file('/tmp-link-force') do it { should be_linked_to '/tmp' } end +describe file('/tmp/link-force-no-dereference') do + it { should be_linked_to 'link-force-no-dereference2' } +end + +describe file('/tmp/link-force-no-dereference/link-force-no-dereference2') do + it { should_not exist } +end + describe command('cd /tmp/git_repo && git rev-parse HEAD') do its(:stdout) { should match(/3116e170b89dc0f7315b69c1c1e1fd7fab23ac0d/) } end describe command('cd /tmp/git_repo_submodule/empty_repo && cat README.md') do its(:stdout) { should match(/Empty Repo/) } end +describe command('cd /tmp/git_repo_depth_1 && git rev-list --count HEAD') do + its(:stdout) { should eq "1\n" } +end + describe file('/tmp/created_by_itamae_user') do it { should be_file } it { should be_owned_by 'itamae' } its(:content) { should eq("/home/itamae\n/home/itamae") } end @@ -214,10 +233,17 @@ it { should be_mode 400 } it { should be_owned_by "itamae2" } it { should be_grouped_into "itamae2" } end +describe file('/tmp/file_edit_with_suid') do + it { should be_file } + it { should be_mode 4755 } + it { should be_owned_by "itamae2" } + it { should be_grouped_into "itamae2" } +end + describe file('/tmp/file_edit_keeping_mode_owner') do it { should be_file } its(:content) { should eq("Hello, Itamae") } it { should be_mode 444 } it { should be_owned_by "itamae" } @@ -260,6 +286,10 @@ its(:mtime) { should be > DateTime.iso8601("2016-05-01T01:23:45Z") } end describe file('/tmp/file_without_content_change_keeping_timestamp') do its(:mtime) { should eq(DateTime.iso8601("2016-05-01T12:34:56Z")) } +end + +describe file('/tmp/subscribed_from_parent') do + it { should be_file } end