We could think of several reason as to why this dog tried to eat his new housemate: he’s a dog, and they try to eat anything they see; he mistook her to be food; he was jealous of all the attention this hedgehog was getting and he wanted her out of the way. We all get a little jealous sometimes, so there’s no place for criticism here.
However, he didn’t know the kind of hedgehog he was dealing with. This hedgehog wouldn’t be intimidated or driven away by anything or anyone, and she decided to give the dog a piece of her mind. She doesn’t need to do a lot – just chasing him around the house is enough to scare him.