title: how to run test with ginkgo framwork in Go
body: <p>I am Learning Go and try to understand basics of Go. I have written function and now i want to test function with predefined test cases.</p>
  
  <p><a href="https://i.stack.imgur.com/0hznX.png" rel="nofollow noreferrer"><img src="https://i.stack.imgur.com/0hznX.png" alt="enter image description here"></a></p>
  
  <p>here is code  </p>
  
  <blockquote>
    <p>filename is arr_test.go</p>
  </blockquote>
  
  <pre><code>package arr_test
  
  import (
  
      . "github.com/onsi/ginkgo"
      . "github.com/onsi/gomega"
      "github.com/manjeettahkur/r_project/arr"
      "testing"
  )
  
  func TestSo(t *testing.T) {
      RunSpecs(t, "My Test Suite")
  }
  
  var _ = Describe("Array", func() {
      Context("i have no idea why is going here", func() {
          It("should be like this", func() {
              Expect(arr.ArrayExm([]int{1, 2, 3, 4}, 10)).To(Equal([]int{1,2,3,4,4,3,2,1,1,2}))
          })
      })
  
  })
  </code></pre>
  
  <blockquote>
    <p>here is file where function is written  arr.go</p>
  </blockquote>
  
  <pre><code>package arr
  
  func ArrayExm(array []int, limit int) []int {
      var res []int
  
      length := len(array)
  
      for i:=0; i &lt; limit; i++ {
  
          if(i/length)%2 == 0{
              res = append(res,array[i%length])
  
          } else {
              res = append(res, array[length -i % length - 1])
          }
      }
  
      return res
  
  }
  </code></pre>
  
  <p>when i run test case i receive this error </p>
  
  <blockquote>
    <p>Test Panicked
        You are trying to make an assertion, but Gomega's fail handler is nil.
        If you're using Ginkgo then you probably forgot to put your assertion in an It().
        Alternatively, you may have forgotten to register a fail handler with RegisterFailHandler() or RegisterTestingT().</p>
  </blockquote>
  
  <p>can anyone help what i am doing wrong here.TIA</p>