diff --git a/src/main/java/com/xtremelabs/robolectric/shadows/ShadowAbsSpinner.java b/src/main/java/com/xtremelabs/robolectric/shadows/ShadowAbsSpinner.java
index dcdb93b..80c73fe 100644
--- a/src/main/java/com/xtremelabs/robolectric/shadows/ShadowAbsSpinner.java
+++ b/src/main/java/com/xtremelabs/robolectric/shadows/ShadowAbsSpinner.java
@@ -1,10 +1,12 @@
 package com.xtremelabs.robolectric.shadows;
 
-import android.widget.AbsSpinner;
-import android.widget.SpinnerAdapter;
 import com.xtremelabs.robolectric.internal.Implementation;
 import com.xtremelabs.robolectric.internal.Implements;
 
+import android.view.View;
+import android.widget.AbsSpinner;
+import android.widget.SpinnerAdapter;
+
 @SuppressWarnings({"UnusedDeclaration"})
 @Implements(AbsSpinner.class)
 public class ShadowAbsSpinner extends ShadowAdapterView {
@@ -27,6 +29,16 @@
     	animatedTransition = animate;
     }
 
+    @Implementation
+    public View getSelectedView() {
+        int selectedItemPosition = getSelectedItemPosition();
+        if (getCount() == 0 || selectedItemPosition < 0) {
+            return null;
+        } else {
+            return getChildAt(selectedItemPosition);
+        }
+    }
+
     // Non-implementation helper method
     public boolean isAnimatedTransition() {
     	return animatedTransition;
diff --git a/src/test/java/com/xtremelabs/robolectric/shadows/AbsSpinnerTest.java b/src/test/java/com/xtremelabs/robolectric/shadows/AbsSpinnerTest.java
index dcac28a..9dbecdb 100644
--- a/src/test/java/com/xtremelabs/robolectric/shadows/AbsSpinnerTest.java
+++ b/src/test/java/com/xtremelabs/robolectric/shadows/AbsSpinnerTest.java
@@ -5,12 +5,17 @@
 import android.content.Context;
 import android.view.View;
 import android.view.ViewGroup;
+import android.widget.AbsSpinner;
 import android.widget.AdapterView;
 import android.widget.ArrayAdapter;
 import android.widget.Gallery;
 import android.widget.Spinner;
+import android.widget.TextView;
+
 import com.xtremelabs.robolectric.Robolectric;
 import com.xtremelabs.robolectric.WithTestDefaultsRunner;
+
+import org.hamcrest.core.IsNull;
 import org.junit.Before;
 import org.junit.Test;
 import org.junit.runner.RunWith;
@@ -52,41 +57,73 @@
 		spinner.setSelection(0);
 		assertThat((String) spinner.getSelectedItem(), equalTo("foo"));
 		assertThat((String) spinner.getSelectedItem(), not(equalTo("bar")));
-		
+
 		spinner.setSelection(1);
 		assertThat((String) spinner.getSelectedItem(), equalTo("bar"));
 		assertThat((String) spinner.getSelectedItem(), not(equalTo("foo")));
 	}
-	
+
 	@Test
 	public void getSelectedItemShouldReturnNull_NoAdapterSet(){
 		assertThat(spinner.getSelectedItem(), nullValue());
 	}
-	
-	@Test (expected = IndexOutOfBoundsException.class)	
+
+	@Test (expected = IndexOutOfBoundsException.class)
 	public void getSelectedItemShouldThrowException_EmptyArray(){
 		spinner.setAdapter(new MyArrayAdapter(context, new String[]{}));
-		spinner.getSelectedItem();		
+		spinner.getSelectedItem();
 	}
-	
+
 	@Test
-	public void setSelectionWithAnimatedTransition() {		
+	public void setSelectionWithAnimatedTransition() {
 		spinner.setAdapter(arrayAdapter);
 		spinner.setSelection(0, true);
-		
+
 		assertThat((String) spinner.getSelectedItem(), equalTo("foo"));
 		assertThat((String) spinner.getSelectedItem(), not(equalTo("bar")));
-		
+
 		assertThat(shadowSpinner.isAnimatedTransition(), equalTo(true));
 	}
 
+    @Test
+    public void testGetSelectedView_noAdapter() {
+        assertThat(spinner.getSelectedView(), nullValue());
+    }
+
+    @Test
+    public void testGetSelectedView_noSelection() {
+        spinner.setAdapter(arrayAdapter);
+        spinner.setSelection(AdapterView.INVALID_POSITION);
+
+        assertThat(spinner.getSelectedView(), nullValue());
+    }
+
+    @Test
+    public void testGetSelectedView_default() {
+        spinner.setAdapter(arrayAdapter);
+
+        assertThat(((TextView) spinner.getSelectedView()).getText().toString(),
+                equalTo("foo"));
+    }
+
+    @Test
+    public void testGetSelectedView_changed() {
+        spinner.setAdapter(arrayAdapter);
+        spinner.setSelection(1);
+
+        assertThat(((TextView) spinner.getSelectedView()).getText().toString(),
+                equalTo("bar"));
+    }
+
     private static class MyArrayAdapter extends ArrayAdapter<String> {
         public MyArrayAdapter(Context context, String[] testItems) {
             super(context, android.R.layout.simple_spinner_item, testItems);
         }
 
         @Override public View getView(int position, View convertView, ViewGroup parent) {
-            return new View(getContext());
+            TextView textView = new TextView(getContext());
+            textView.setText(getItem(position));
+            return textView;
         }
     }
 }
