Skip to content

kavalenka/ruby-method-missing-test

 
 

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

6 Commits
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

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.

About

A test for Middle Ruby Developer on :method_missing

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages

  • Ruby 100.0%