You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Rack this is pretty new to me, so I'm trying to figure out why in my tests this value is not being set. I'm using http_router with Cramp (http://cramp.in). From what I can gather it doesn't seem that env is properly set for Rack::MockRequest.new
In Cramp you'd find something like this:
@request = Rack::MockRequest.new(app)
app is basically class of the Cramp::Action, or Rack app basically. So in my case it's like UsersController::Show
Then it seems you can call get on that @request with some URI. But it seems that the router is completely out the game here. Is it correct to assume I just have to fake extra params that I was expecting to get from path like this: /:variaible/users/:id
Thanks.
The text was updated successfully, but these errors were encountered:
Rack this is pretty new to me, so I'm trying to figure out why in my tests this value is not being set. I'm using http_router with Cramp (http://cramp.in). From what I can gather it doesn't seem that env is properly set for
Rack::MockRequest.new
In Cramp you'd find something like this:
app is basically class of the Cramp::Action, or Rack app basically. So in my case it's like
UsersController::Show
Then it seems you can call
get
on that@request
with some URI. But it seems that the router is completely out the game here. Is it correct to assume I just have to fake extra params that I was expecting to get from path like this:/:variaible/users/:id
Thanks.
The text was updated successfully, but these errors were encountered: