summaryrefslogtreecommitdiff
path: root/SmartDeviceLinkTests/LoggingSpecs
diff options
context:
space:
mode:
authorNicoleYarroch <nicole@livio.io>2017-09-12 11:13:52 -0400
committerNicoleYarroch <nicole@livio.io>2017-09-12 11:13:52 -0400
commitdfa2100de755e35b257a1baa24b62124bc69e1e4 (patch)
treec415472b54c6791e822fa2314021b65589420460 /SmartDeviceLinkTests/LoggingSpecs
parent3e3407e9bcd0b478edf74fb4a36a13fb0fe26de5 (diff)
downloadsdl_ios-dfa2100de755e35b257a1baa24b62124bc69e1e4.tar.gz
Fixed test case documentation
Signed-off-by: NicoleYarroch <nicole@livio.io>
Diffstat (limited to 'SmartDeviceLinkTests/LoggingSpecs')
-rw-r--r--SmartDeviceLinkTests/LoggingSpecs/SDLLogManagerSpec.m12
1 files changed, 2 insertions, 10 deletions
diff --git a/SmartDeviceLinkTests/LoggingSpecs/SDLLogManagerSpec.m b/SmartDeviceLinkTests/LoggingSpecs/SDLLogManagerSpec.m
index 85fc60ba4..28977cf4d 100644
--- a/SmartDeviceLinkTests/LoggingSpecs/SDLLogManagerSpec.m
+++ b/SmartDeviceLinkTests/LoggingSpecs/SDLLogManagerSpec.m
@@ -137,11 +137,10 @@ describe(@"a log manager", ^{
__block NSString *testVerboseFormattedLog;
__block int expectedLogCount;
- __block int testLogLevel;
__block NSMutableArray<NSString *> *expectedMessages;
__block NSMutableArray<NSString *> *notExpectedMessages;
- context(@"debug configuration", ^{
+ context(@"The type of debug messages logged depends on the SDLLogLevel", ^{
beforeEach(^{
testConfiguration = [[SDLLogConfiguration alloc] init];
testConfiguration.targets = [NSSet setWithObject:testLogTarget];
@@ -168,7 +167,7 @@ describe(@"a log manager", ^{
notExpectedMessages = [[NSMutableArray alloc] init];
});
- describe(@"", ^{
+ describe(@"When the global log level is set", ^{
beforeEach(^{
expectedLogCount = 0;
expect(testLogTarget.formattedLogMessages.count).to(equal(0));
@@ -178,7 +177,6 @@ describe(@"a log manager", ^{
it(@"should not log anything when the log level is OFF", ^{
testConfiguration.globalLogLevel = SDLLogLevelOff;
- testLogLevel = SDLLogLevelOff;
expectedLogCount = 0;
[notExpectedMessages addObject:testWarningFormattedLog];
@@ -189,7 +187,6 @@ describe(@"a log manager", ^{
it(@"should only log errors when the log level is ERROR", ^{
testConfiguration.globalLogLevel = SDLLogLevelError;
- testLogLevel = SDLLogLevelError;
expectedLogCount = 1;
[expectedMessages addObject:testErrorFormattedLog];
@@ -201,7 +198,6 @@ describe(@"a log manager", ^{
it(@"should only log errors and warnings when the log level is WARNING", ^{
testConfiguration.globalLogLevel = SDLLogLevelWarning;
- testLogLevel = SDLLogLevelWarning;
expectedLogCount = 2;
[expectedMessages addObject:testWarningFormattedLog];
@@ -213,7 +209,6 @@ describe(@"a log manager", ^{
it(@"should only log errors, warnings, and debug logs when the log level is DEBUG", ^{
testConfiguration.globalLogLevel = SDLLogLevelDebug;
- testLogLevel = SDLLogLevelDebug;
expectedLogCount = 3;
[expectedMessages addObject:testWarningFormattedLog];
@@ -225,7 +220,6 @@ describe(@"a log manager", ^{
it(@"should log errors, warnings, debug, and verbose logs when the log level is VERBOSE", ^{
testConfiguration.globalLogLevel = SDLLogLevelVerbose;
- testLogLevel = SDLLogLevelVerbose;
expectedLogCount = 4;
[expectedMessages addObject:testWarningFormattedLog];
@@ -235,8 +229,6 @@ describe(@"a log manager", ^{
});
afterEach(^{
- SDLLogFileModule *module = [[SDLLogFileModule alloc] initWithName:@"test" files:[NSSet setWithObject:@"test"] level:testLogLevel];
- testConfiguration.modules = [NSSet setWithObject:module];
[testManager setConfiguration:testConfiguration];
// Warning