Class: Redbreast::TemplateGenerator::ColorTest::Swift

Inherits:
Swift
  • Object
show all
Includes:
ERB::Util
Defined in:
lib/redbreast/template_generators/tests/colors/swift_colors_tests_template_generator.rb

Overview

Used for creating color tests in swift.

Instance Method Summary collapse

Instance Method Details

#templateObject



9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
# File 'lib/redbreast/template_generators/tests/colors/swift_colors_tests_template_generator.rb', line 9

def template
<<~TEMPLATE
  import UIKit
  import XCTest
  @testable import <%= bundle[:testableImport] %>

  // THIS FILE IS AUTOGENERATED, DO NOT EDIT BY HAND
  class <%= File.basename(bundle[:outputTestPathColors], ".*") %>: XCTestCase {

      func testIfColorsArePresent() {
  <%= create_swift_test_cases(names: asset_names, declaration: '_ = UIColor.', app_name: app_name) %>
      }
  }
TEMPLATE
end