Add RSpec unit tests for methods