Using a Grape API and add the tests in the Rakefile
. Its a Rack application mounted on the main rails app.
namespace :test do
Rake::TestTask.new(:api) do |t|
t.pattern = 'test/api/**/*_test.rb'
end
end
Rake::Task[:test].enhance [ 'test:api' ]
However if I try to test it there aren't any of the controller methods.
describe API do
# get, post, patch etc all raise
end
Error below.
NoMethodError: undefined method `get' for #<#<Class:0x007fd63cdfc0e0>:0x007fd63cdc7a70>
How can I test rack apps with minitest-rails
bdd?