Some task solution with Ruby(RSpec&Cucumber)