Class: Redbreast::TemplateGenerator::ColorTest::ObjC

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

Overview

Used for creating color tests in objective-c.

Instance Method Summary collapse

Methods inherited from ObjC

#h_filename, #m_filename

Instance Method Details

#h_templateObject



9
10
11
# File 'lib/redbreast/template_generators/tests/colors/objc_colors_tests_template_generator.rb', line 9

def h_template
  nil
end

#m_templateObject



13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
# File 'lib/redbreast/template_generators/tests/colors/objc_colors_tests_template_generator.rb', line 13

def m_template
  <<~TEMPLATE

    #import <XCTest/XCTest.h>
    #import "UIColor+<%= app_name.nil? ? "Common" : app_name %>.h"

    @interface <%= File.basename(bundle[:outputTestPathColors]) %> : XCTestCase

    @end

    @implementation Test

    - (void)testExample
    {<%= create_objc_test_cases(names: asset_names, variable: '\n\t[UIColor %s];')%>
    }

    @end
  TEMPLATE
end