use documentation instead of nested for rspec