🚧 This document is being continuously fine-tuned, and thus may change upon consecutive verifications 🚧
Each verification is performed with Tech Lead unless instructed otherwise. Curated list of basic learning resources can be found here
# 1) All right... my task is to sync hotels with Cloudbeds. So probably this will be a rake task, but | |
# for simplicity I will just choose service as my outermost layer! Lets's dive in! I love BDD! | |
module Cloudbeds | |
describe SyncHotels do | |
# 2) it is a service, so to keep convention I'll test .call method | |
# Some small description of what I want it to do won't hurt as well. | |
# Scratch that! Description is essential! | |
describe '.call' do | |
it 'upserts hotels based on data returned from CloudBeds' do | |
# 7) Uh oh! I have realized that we will need to refresh a token once in a while. |
require 'rails_helper' | |
require 'support/matchers/have_table_row' | |
describe 'have_table_row matcher' do | |
context 'when columns are described by name' do | |
context 'when table contains expected data' do | |
it 'ensures that page have table with given data' do | |
page = Capybara.string <<-HTML | |
<table> | |
<thead> |
def with_enumerated(subject, method_name) | |
begin | |
subject.define_singleton_method("#{method_name}_with_enum") do |*args, &block| | |
return enum_for(method_name, *args) unless block.present? | |
public_send("#{method_name}_without_enum",*args, &block) | |
end | |
subject.singleton_class.alias_method "#{method_name}_without_enum", method_name | |
subject.singleton_class.alias_method method_name, "#{method_name}_with_enum" | |
yield | |
ensure |
with_enumerated(Poller, :poll) do | |
$stop = false | |
poller = Poller.poll(condition: -> { $stop == true }) | |
first_value = poller.next | |
expect(first_value).to eq 1 | |
$stop = true | |
second_value = poller.next | |
expect(second_value).to eq 2 |
🚧 This document is being continuously fine-tuned, and thus may change upon consecutive verifications 🚧
Each verification is performed with Tech Lead unless instructed otherwise. Curated list of basic learning resources can be found here
Be prepared to show following GIT CLI skills in action. All skills are required to get :
Be prepared to explain and effectively use following language and ActiveSupport features
Max score: 152
Minimum requirements:
You will not get a pass if you check more than 5 items that you will not be able to prove being knowledgeable about during verification, so check items only if you are sure about them. Be advised, that questions will be rather general ("what does that return?", "what does it do?", "how does that differ from x?").
Provide the list or PR or other contributions that proves understanding of each subject group or ask for tech interview (more time effective), where we will go step by step throught the following list.
Max score: 331
Minimum requirements:
You will not get a pass if you check more than 5 items that you will not be able to prove being knowledgeable about during verification, so check items only if you are sure about them. Be advised, that questions will be rather general ("what does that return?", "what is it all about?", "what does that mean?", "how does that differ from x?").
Be prepared to explaing following terms/rules/principles etc.
# spec/events/locks/code_generate_event_spec.rb | |
module Locks | |
RSpec.describe CodeGeneratedEvent do | |
it 'validates presence of code, reservation id and room id' do | |
expect(CodeGeneratedEvent.new(code: nil, reservation_id: 1, room_id: 1)).not_to be_valid | |
expect(CodeGeneratedEvent.new(code: '123', reservation_id: nil, room_id: 1)).not_to be_valid | |
expect(CodeGeneratedEvent.new(code: '123', reservation_id: 1, room_id: nil)).not_to be_valid | |
expect(CodeGeneratedEvent.new(code: '123', reservation_id: 1, room_id: 1)).to be_valid | |
end | |
end |