Skip to content
This repository was archived by the owner on May 1, 2018. It is now read-only.

homeworks#37

Open
flaminisx wants to merge 3 commits into
denysxftr:masterfrom
flaminisx:master
Open

homeworks#37
flaminisx wants to merge 3 commits into
denysxftr:masterfrom
flaminisx:master

Conversation

@flaminisx
Copy link
Copy Markdown

No description provided.

Copy link
Copy Markdown
Owner

@denysxftr denysxftr left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

good but see comments

Comment thread hw2/lib/router.rb
@routes[env['REQUEST_METHOD']].each do |k, v|
return v.call(env) if Regexp.new(k) === env['REQUEST_PATH']
end
[404, [], ['404, Not Found']]
Copy link
Copy Markdown
Owner

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

this should be [404, {}, ['404, Not Found']]

it 'matches request' do
expect(subject.call(env)).to eq [200, {}, ['got get request with id and something']]
end
end
Copy link
Copy Markdown
Owner

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

i would be great to have tests for 404 case

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants