The conditioned place preference (CPP) paradigm entails appetitive learning and is utilized to investigate the motivational effects of drug and natural reward in rodents. However, a typical CPP design does not allow dissociation between cue- and context-dependent appetitive learning. In humans, context and cues that had been associated with drug reward can elicit conditioned response and drug craving. Therefore, we investigated (a) methods by which to discriminate between cue- and context-dependent appetitive learning, and (b) the role of the neuronal nitric oxide synthase (nNOS) gene in appetitive learning. Wild-type (WT) and nNOS knockout (KO) mice were trained by cocaine (20 mg/kg) in a discrete context paired with a light cue (a compound context-cue stimulus). In test 1, approach behaviour to either the training context or to the cue in a novel context was determined. WT mice showed robust preference for both cocaine-associated context and cue. nNOS KO mice acquired approach behaviour for the cocaine-associated context but not cue. This finding suggests that the nNOS gene is required for cue-dependent appetitive learning. On the following day (test 2), mice were tested for approach behaviour to the compound context-cue stimulus. Context but not cue exposure in test 1 reduced approach behaviour to the compound context-cue stimulus in test 2, suggesting that repeated context but not cue exposures diminished the conditioned response. Hence, this modified CPP paradigm is useful for the investigation of approach behaviour for both drug-associated context and cue, and allows further investigation of mechanisms underlying cue- and context-dependent appetitive learning.