Skip to content

Instantly share code, notes, and snippets.

View jalkoby's full-sized avatar

Sergii Pchelintsev jalkoby

View GitHub Profile
@jalkoby
jalkoby / gist:1cc21ffb347196ac69c43add7ebe7863
Created February 12, 2019 19:42
A test task for frontend(react) dev
Add a simple gallery of pokemons (using a pokemon API)
Requirements:
- fetch data using (GET https://pokeapi.co/api/v2/pokemon), more info can be found https://pokeapi.co
- display each record as a card with name & image (https://raw.githubusercontent.com/PokeAPI/sprites/master/sprites/pokemon/:id.png)
- add ability to move back and forward
- by click on a card fetch a pokemon's details from (GET https://pokeapi.co/api/v2/pokemon/:id) and show height, weight, moves as overlay on image.
@jalkoby
jalkoby / my_awesome_rspec_hacks.rb
Created September 29, 2018 13:05
My awesome RSpec hacks
## Context + metadata
shared_context 'Logged as a user', role: true do
let(:user) { |example| create :user, example.metadata[:role] }
before { login_as user }
end
scenario "Login as a client", role: :client
scenario "Login as a customer", role: :customer
scenario "Login as an admin", role: :admin