Sha256: 483a5dcc0c514c49855b071e2e0044451bc5343f003ff8576097da6b4f3e3dae

Contents?: true

Size: 821 Bytes

Versions: 19

Compression:

Stored size: 821 Bytes

Contents

require 'redbreast/template_generators/objc_template_generator'

module Redbreast
  module TemplateGenerator
    module ImageTest
      # Used for creating image tests in objective-c.
      class ObjC < TemplateGenerator::ObjC
        include ERB::Util
        def h_template
          nil
        end

        def m_template
          <<~TEMPLATE

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

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

            @end

            @implementation Test

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

            @end
          TEMPLATE
        end
      end
    end
  end
end

Version data entries

19 entries across 19 versions & 1 rubygems

Version Path
redbreast-1.4.2 lib/redbreast/template_generators/tests/images/objc_images_tests_template_generator.rb
redbreast-1.4.1 lib/redbreast/template_generators/tests/images/objc_images_tests_template_generator.rb
redbreast-1.4.0 lib/redbreast/template_generators/tests/images/objc_images_tests_template_generator.rb
redbreast-1.3.1 lib/redbreast/template_generators/tests/images/objc_images_tests_template_generator.rb
redbreast-1.3.0 lib/redbreast/template_generators/tests/images/objc_images_tests_template_generator.rb
redbreast-1.2.5 lib/redbreast/template_generators/tests/images/objc_images_tests_template_generator.rb
redbreast-1.2.4 lib/redbreast/template_generators/tests/images/objc_images_tests_template_generator.rb
redbreast-1.2.3 lib/redbreast/template_generators/tests/images/objc_images_tests_template_generator.rb
redbreast-1.2.2 lib/redbreast/template_generators/tests/images/objc_images_tests_template_generator.rb
redbreast-1.2.1 lib/redbreast/template_generators/tests/images/objc_images_tests_template_generator.rb
redbreast-1.2.0 lib/redbreast/template_generators/tests/images/objc_images_tests_template_generator.rb
redbreast-1.1.2 lib/redbreast/template_generators/tests/images/objc_images_tests_template_generator.rb
redbreast-1.1.1 lib/redbreast/template_generators/tests/images/objc_images_tests_template_generator.rb
redbreast-1.1.0 lib/redbreast/template_generators/tests/images/objc_images_tests_template_generator.rb
redbreast-1.0.4 lib/redbreast/template_generators/tests/images/objc_images_tests_template_generator.rb
redbreast-1.0.3 lib/redbreast/template_generators/tests/images/objc_images_tests_template_generator.rb
redbreast-1.0.2 lib/redbreast/template_generators/tests/images/objc_images_tests_template_generator.rb
redbreast-1.0.1 lib/redbreast/template_generators/tests/images/objc_images_tests_template_generator.rb
redbreast-1.0.0 lib/redbreast/template_generators/tests/images/objc_images_tests_template_generator.rb