Skip to content

Instantly share code, notes, and snippets.

What would you like to do?
RSpec test showing Test Driven Learning
# spec/shorten_array_spec.rb
require 'shorten_array.rb'
describe ShortenArray do
it 'returns the first 2 items from the array' do
best_array_ever = %w[best array ever]
result = ShortenArray.first_two_items(best_array_ever)
expect(result).to eq %w[best array]
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
You can’t perform that action at this time.