forked from tauraloke/ruby-method-missing-test
-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathreadme.txt
More file actions
19 lines (11 loc) · 1.04 KB
/
readme.txt
File metadata and controls
19 lines (11 loc) · 1.04 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
This is a test task on your ability to use :method_missing in ruby. Given a json file db.json and you need to enhance a class JsonDb to make tests in spec/json_db_spec.rb pass. There are 3 test examples based on complexity. You should start with complexity #1 and move up. You don't have to implement all 3 complexity levels. Do only those you feel you can handle. For example, you can do complexity #1 and report to us that you can't implement complexity #2.
NOTE: you should NOT hardcode db.json structure in JsonDb class. The json can be changed and your class should work with another json as well.
We expect you to fork the repo and send us a link to your copy of the repo once you are done with the test.
Complexity Level #1: read properties on all levels
Complexity Level #2: write properties on all levels
Complexity Level #3: read instances of dynamically defined classes on all levels
In order to run rspec you should install the gem:
> gem install rspec
and run rspec:
> rspec
NOTE: if you find any errors / typos in the test pls report to us.