Search code examples
rspecruby-on-rails-2grape-api

How to add spec test to grape api in rails 2.3?


all

I want to add rspec tests to grape API. and our app is still on rails 2.3.8 .

for the rspec 2+ , we have that solution.

https://github.com/dblock/grape/commit/99bf4b44c511541c0e10f4506bf34ae9abcccd75

but is there a solution rspec 1.3? As rspec 2+ can't work on rails 2.3. but rails3 at least.

I digged the code, and can't find a example can help. anybody help? thanks.


Solution

  • RSpec 1 does not have request specs, which is what is described.

    You can use the Rails 2 integration testing framework to achieve the same result. You will have to run the test using test/unit though; since this will never be supported in RSpec 1.