ruby on rails - Best way to test HTTP queries -


i'm working on gem rails app basic operations on odata service (retrieve info regarding ski resorts). test using rspec, cannot manage write relevant , efficient tests it. can find gem's code on github, it's pretty basic (core code in lib/anmsm_ruby.rb , tests in spec folder) https://github.com/alpinelab/anmsm_ruby

what rspec experts think best approach ?

when test external web api use advantage of vcr gem.

vcr recordes real http response web service , stores in .yml fixture, called cassette.

that way can example test if returned array of all_resorts method has expected values/items.


Comments

Popular posts from this blog

java - activate/deactivate sonar maven plugin by profile? -

python - TypeError: can only concatenate tuple (not "float") to tuple -

java - What is the difference between String. and String.this. ? -