Sha256: 80c5b4d8d8f3e7588d6a95309a40154efe8e53fcc00b1d4de1ef55dee3d13037
Contents?: true
Size: 876 Bytes
Versions: 1
Compression:
Stored size: 876 Bytes
Contents
describe "directions" do let(:all) { [Norte.new, Sur.new, Este.new, Oeste.new] } it "should evaluate any direction to self" do all.each { |dir| expect(dir.evaluate).to eq(dir) } end it "should return the string representation" do expect(all.map(&:to_s)).to eq(['Norte', 'Sur', 'Este', 'Oeste']) end describe Norte do it "should return Sur as opposite direction" do expect(Norte.new.opposite).to eq(Sur.new) end end describe Este do it "should return Oeste as opposite direction" do expect(Este.new.opposite).to eq(Oeste.new) end end describe Sur do it "should return Norte as opposite direction" do expect(Sur.new.opposite).to eq(Norte.new) end end describe Oeste do it "should return Este as opposite direction" do expect(Oeste.new.opposite).to eq(Este.new) end end end
Version data entries
1 entries across 1 versions & 1 rubygems
Version | Path |
---|---|
gobstones-0.0.1.1 | spec/lang/literals/directions_spec.rb |