franela / goblin

Minimal and Beautiful Go testing framework
MIT License
884 stars 79 forks source link

Feature Request: Ignore() #60

Closed jayd3e closed 7 years ago

jayd3e commented 7 years ago

There should be a way to ignore tests if necessary. A great use case for this is a situation where you need to account for a test in the future, but it doesn't apply now. Your choices at the moment are to either delete it or comment the test out. I would prefer to just be able to ignore it. Another great use-case is integration tests with third parties that you don't always want to run. You could implement it like so:

g.Ignore("Should add two numbers ", func() {
    g.Assert(1+1).Equal(2)
})

Testing frameworks in Scala have a similar feature.

marcosnils commented 7 years ago

Fixed by #62

jayd3e commented 7 years ago

@marcosnils awesome! Excited to use this feature. I have to say though that Xit is far less clear than a name like Ignore. Not sure why it was selected.