Skip to content

Instantly share code, notes, and snippets.

@peterjgrainger
Created January 28, 2019 10:48
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]
end
end
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment