I've noticed that sometimes the light on my power cable turns off while it's plugged in... I'm guessing that means the connection is faulty and my MacBook isn't being charged. If I move the cable it turns back on, and generally stays that way, so it's not exactly an easy problem to reproduce as it doesn't happen all the time... would Apple still replace it for free if they plug it in and see it working properly?
Yeah, my MacBook Pro had the same problem. It seems to a common issue. If it's under warranty still, just take it to a store and they'll replace it for free. Otherwise it's pretty expensive.
If it's under warranty and not the result of avoidable damage, then probably yes. Are you sure the MacBook isn't charging? Check the battery icon on the screen, or check the Energy Saver tool in the System Preference window.
I've only had my MacBook around 3-4 weeks so warranty isn't a problem. It's only happened a few times so far but I've got a feeling it'll just get more common. I didn't actually check the battery icon (stupid of me), I just moved the cable out of instinct and the light came back on. I'll check next time.
If you don't have an Apple Store nearby you can call Apple and if you're persuasive enough they'll cross ship you a new power adapter.
Funny you mention this, as I am also having charging problems recently. I have two adapters which show "Not Charging" in the menu bar, no green light or otherwise. I'm hoping my battery is covered by warranty as I have to travel 100+ miles to the Apple Store.
I've had no trouble so far with my MBP, knock on wood. Might get a can of compressed air and flush out the dust under the keys, though.
Check to see if the power brick has a green dot on it. Those that don't, like the one from my 1st gen Intel MB, have a known issue with the connection between the wire and the magsafe. I even uploaded a video to youtube showing mine not working correctly after the cord caught fire when I stepped out of the room.