         
         view.layoutSubviews()
         
-        expect(view.subviews[2].backgroundColor).to(equal(UIColor.blue))
+        let fillView = view.subviews[fillViewIndex]
+        expect(fillView.backgroundColor).to(equal(UIColor.blue))
     }
     
     func testShouldAllowSettingProgressBarWidth() {

    
    func testLayoutSubviews_shouldRenderBackgroundViewWithDefaultColors() {
        let view = setupView()
        let backgroundView = view.subviews[1]
        
        expect(backgroundView.layer.borderColor).to(equal(UIColor.black.cgColor))
        expect(backgroundView.backgroundColor).to(equal(UIColor.white))

import GTProgressBar

class GTProgressBarTests: XCTestCase {
    private let backgroundViewIndex = 1
    private let fillViewIndex = 2
    
    func testInitWithFrame_shouldCreateAllSubviews() {
        let view = GTProgressBar(frame: CGRect.zero)
