spec/lib/jasmine/formatters/exit_code_spec.rb in jasmine-2.99.0 vs spec/lib/jasmine/formatters/exit_code_spec.rb in jasmine-3.0.0
- old
+ new
@@ -1,34 +1,19 @@
require 'spec_helper'
describe Jasmine::Formatters::ExitCode do
subject(:formatter) { Jasmine::Formatters::ExitCode.new }
- it 'is successful with no results' do
- formatter.done({})
+ it 'is successful with an overall status of "passed"' do
+ formatter.done({
+ 'overallStatus' => 'passed'
+ })
expect(formatter).to be_succeeded
end
- it 'is unsuccessful with a failure' do
- formatter.format([double(:result, failed?: true)])
- formatter.done({})
- expect(formatter).not_to be_succeeded
- end
-
- it 'finds a single failure to cause the error' do
- formatter.format([double(failed?: false), double(failed?: false), double(failed?: true), double(failed?: false)])
- formatter.done({})
- expect(formatter).not_to be_succeeded
- end
-
- it 'is unsuccessful with a failedExpectation in done' do
+ it 'is successful with any other overall status' do
formatter.done({
- 'failedExpectations' => [{}]
+ 'overallStatus' => 'incomplete'
})
expect(formatter).not_to be_succeeded
- end
-
- it 'is still successful with empty failedExpectations in done' do
- formatter.done({ 'failedExpectations' => [] })
- expect(formatter).to be_succeeded
end
end