Sha256: d2cc1f67b12120212545254e5e465510cc2669c419c154bb7b00a47c06c35801

Contents?: true

Size: 574 Bytes

Versions: 5

Compression:

Stored size: 574 Bytes

Contents

require "test_helper"

module Cogy
  class BuiltinHelpersTest < ActionDispatch::IntegrationTest
    include Engine.routes.url_helpers

    setup { @routes = Engine.routes }

    def test_args_helper_overrides_predefined_helpers
      cmd :args_overrides, COG_ARGV_1: "hu", COG_ARGV_0: "haha"
      assert_equal "hahahu", response.body
    end

    def test_args_with_empty_arguments
      cmd :empty_args
      assert_equal "true", response.body
    end

    def test_args
      cmd :add, COG_ARGV_0: 1, COG_ARGV_1: 2
      assert_equal "3", response.body
    end
  end
end

Version data entries

5 entries across 5 versions & 1 rubygems

Version Path
cogy-0.6.0 test/integration/builtin_helpers_test.rb
cogy-0.5.2 test/integration/builtin_helpers_test.rb
cogy-0.5.1 test/integration/builtin_helpers_test.rb
cogy-0.5.0 test/integration/builtin_helpers_test.rb
cogy-0.4.0 test/integration/builtin_helpers_test.rb