Skip to content

Commit

Permalink
fixup! TO3k7
Browse files Browse the repository at this point in the history
  • Loading branch information
ricardopereira committed Oct 13, 2016
1 parent 9f6cb1b commit 255ff0c
Showing 1 changed file with 16 additions and 7 deletions.
23 changes: 16 additions & 7 deletions Spec/RestClient.swift
Original file line number Diff line number Diff line change
Expand Up @@ -619,14 +619,23 @@ class RestClient: QuickSpec {
expect(options.fallbackHosts).to(beNil())
expect(options.fallbackHostsUseDefault).to(beFalse())

options.fallbackHostsUseDefault = true
options.fallbackHosts = []
expect(options.fallbackHosts).toNot(beNil())
expect(options.fallbackHostsUseDefault).to(beFalse())
expect{ options.fallbackHosts = [] }.toNot(raiseException())

options.fallbackHostsUseDefault = true
expect(options.fallbackHosts).to(beNil())
expect(options.fallbackHostsUseDefault).to(beTrue())
expect{ options.fallbackHostsUseDefault = true }.to(
raiseException { exception in
expect(exception.name).to(equal(ARTFallbackIncompatibleOptionsException))
}
)

options.fallbackHosts = nil

expect{ options.fallbackHostsUseDefault = true }.toNot(raiseException())

expect { options.fallbackHosts = ["fake.ably.io"] }.to(
raiseException { exception in
expect(exception.name).to(equal(ARTFallbackIncompatibleOptionsException))
}
)
}

}
Expand Down

0 comments on commit 255ff0c

Please sign in to comment.