mirror of
https://github.com/inspec/inspec
synced 2024-11-23 05:03:07 +00:00
brittle tests
Signed-off-by: Miah Johnson <miah@chia-pet.org>
This commit is contained in:
parent
a5c8021227
commit
9a580407e6
1 changed files with 6 additions and 6 deletions
|
@ -30,7 +30,7 @@ describe 'Deprecation Facility Behavior' do
|
|||
json_result[1]['message'].must_include 'This should fail'
|
||||
json_result[1]['message'].must_include '(used at'
|
||||
json_result[1]['message'].must_include 'test/unit/mock/profiles/deprecation/typical/controls/typical.rb'
|
||||
json_result[1]['message'].must_include 'typical.rb:11' # Line number check
|
||||
json_result[1]['message'].must_include 'typical.rb:10' # Line number check
|
||||
end
|
||||
end
|
||||
|
||||
|
@ -52,7 +52,7 @@ describe 'Deprecation Facility Behavior' do
|
|||
deprecation_line.must_include 'This should fail'
|
||||
deprecation_line.must_include '(used at'
|
||||
deprecation_line.must_include 'test/unit/mock/profiles/deprecation/bare/controls/bare.rb'
|
||||
deprecation_line.must_include 'bare.rb:3'
|
||||
deprecation_line.must_include 'bare.rb:2'
|
||||
end
|
||||
end
|
||||
end
|
||||
|
@ -76,7 +76,7 @@ describe 'Deprecation Facility Behavior' do
|
|||
deprecation_line.must_include 'This should exit'
|
||||
deprecation_line.must_include '(used at' # Beginning of a single-frame stack locator
|
||||
deprecation_line.must_include 'test/unit/mock/profiles/deprecation/typical/controls/typical.rb' # Frame should have been identified as coming from the test profile
|
||||
deprecation_line.must_include 'typical.rb:28' # Line number check
|
||||
deprecation_line.must_include 'typical.rb:27' # Line number check
|
||||
|
||||
# The reporter should not fire
|
||||
run_result.stdout.must_be_empty
|
||||
|
@ -102,7 +102,7 @@ describe 'Deprecation Facility Behavior' do
|
|||
deprecation_line.must_include 'This should exit' # Specific deprecation message
|
||||
deprecation_line.must_include '(used at' # Beginning of a single-frame stack locator
|
||||
deprecation_line.must_include 'test/unit/mock/profiles/deprecation/typical/controls/typical.rb' # Frame should have been identified as coming from the test profile
|
||||
deprecation_line.must_include 'typical.rb:45' # Line number check
|
||||
deprecation_line.must_include 'typical.rb:44' # Line number check
|
||||
|
||||
# The reporter should not fire
|
||||
run_result.stdout.must_be_empty
|
||||
|
@ -130,7 +130,7 @@ describe 'Deprecation Facility Behavior' do
|
|||
deprecation_line.must_include 'This should warn' # Specific deprecation message
|
||||
deprecation_line.must_include '(used at' # Beginning of a single-frame stack locator
|
||||
deprecation_line.must_include 'test/unit/mock/profiles/deprecation/typical/controls/typical.rb' # Frame should have been identified as coming from the test profile
|
||||
deprecation_line.must_include 'typical.rb:62' # Line number check
|
||||
deprecation_line.must_include 'typical.rb:61' # Line number check
|
||||
end
|
||||
end
|
||||
|
||||
|
@ -153,7 +153,7 @@ describe 'Deprecation Facility Behavior' do
|
|||
deprecation_line.must_include 'DEPRECATION'
|
||||
deprecation_line.must_include '(used at' # Beginning of a single-frame stack locator
|
||||
deprecation_line.must_include 'test/unit/mock/profiles/deprecation/typical/controls/typical.rb' # Frame should have been identified as coming from the test profile
|
||||
deprecation_line.must_include 'typical.rb:78' # Line number check
|
||||
deprecation_line.must_include 'typical.rb:77' # Line number check
|
||||
end
|
||||
end
|
||||
end
|
||||
|
|
Loading…
Reference in a new issue