mirror of
https://github.com/inspec/inspec
synced 2024-12-24 03:53:15 +00:00
30 lines
682 B
Ruby
30 lines
682 B
Ruby
|
|
||
|
# This should simply not error
|
||
|
unless attribute('test-01') == 'test-01'
|
||
|
raise 'Failed bare input access'
|
||
|
end
|
||
|
|
||
|
describe attribute('test-02') do
|
||
|
it { should cmp 'test-02' }
|
||
|
end
|
||
|
|
||
|
describe 'mentioning an input in a bare describe block as a redirected subject' do
|
||
|
subject { attribute('test-03') }
|
||
|
it { should cmp 'test-03' }
|
||
|
end
|
||
|
|
||
|
control 'test using an input inside a control block as the describe subject' do
|
||
|
desc 'test the val_numeric attr'
|
||
|
describe attribute('test-04') do
|
||
|
it { should cmp 'test-04' }
|
||
|
end
|
||
|
end
|
||
|
|
||
|
control "test using inputs in the test its block" do
|
||
|
describe 'test-05' do
|
||
|
it { should cmp attribute('test-05') }
|
||
|
end
|
||
|
end
|
||
|
|
||
|
# TODO: add test for OR
|