Upgrade test suite to RSpec 3.0
Add map_to_primitive, closes #4