The determination of cost basis would be for every transaction, no matter how minor. From the linked article:
“Todays IRS guidance will provide certainty for investors, along with potential income-tax liability. Under the ruling, purchasing a $2 cup of coffee with Bitcoins bought for $1 would trigger $1 in capital gains for the coffee drinker and $2 of income for the coffee shop.”