Sha256: d44c33295c4f6c5b3deb88a10a242ceabca3cf4d4c0ba3f9b449789ebb908a63
Contents?: true
Size: 434 Bytes
Versions: 1
Compression:
Stored size: 434 Bytes
Contents
require 'spec_helper' module Either describe Match do let (:match) { Match.new } it 'can have a left match added to it' do match.left { |x| x * 2 } end it 'can have a right match added to it' do match.right { |x| x * 4 } end it 'evaluates the first match on the correct side that matches' do match.left(5) { |x| x * x } expect(match.evaluate(Left[5])).to eq 25 end end end
Version data entries
1 entries across 1 versions & 1 rubygems
Version | Path |
---|---|
either-0.0.2 | spec/lib/either/match_spec.rb |