rspec tests added

Rspec tests are done to keep up with known variables to handle. This is done in place of simple tests and examples before.