getting the testing env up and running

61 views
Skip to first unread message

Ray Fix

unread,
Dec 9, 2011, 10:27:22 PM12/9/11
to RestKit Group
Thanks for updating TESTING.md instructions for master.  I think they are very useful.  I have been meaning to get up and running with the tests as I feel it will greatly help on the road to deepening my understanding with RestKit.  

I did have some setup problems (and solutions) that I wanted to share.  I thought about adding this to the TESTING.md file but  decided against it.  Doesn't match the style.


Troubleshooting
---------------
It is a good idea to install ruby using rvm (the ruby version manager).  
See http://beginrescueend.com/  This lets you quickly switch between 
versions of ruby and different gemsets.  When you cd into the RestKit 
directory, if you are using rvm, it will switch to using ruby 1.9.2 
with the gemset RestKit.  

I encountered a couple of problems using installing the necessary gems for testing.  

With Xcode 4.3b1 (probably the same for 4.2.1) I needed to rebuild 
ruby-1.9.2-p290 this way `rvm install ruby-1.9.2-p290 --with-gcc=clang` 
Only then would my bundle work.  (I was getting an error bundle error 
with eventmachine.)  Aside: using Ruby 1.9.3-p0 I was able to bundle with 
no problems but the spec server would not run because of a namespace 
collision with an object called Config.

I also needed to create a dummy file to run the tests for the first time.  
I did this with `echo "foo" > RestKit/Specs/Fixtures/Uploads/file`
Reply all
Reply to author
Forward
0 new messages