Sha256: 167939249ad190441ed9380445cc0ed59d5f5a3e5aa2f631c73b16fd1cdb3a36
Contents?: true
Size: 512 Bytes
Versions: 3
Compression:
Stored size: 512 Bytes
Contents
require 'spec_helper' describe Languages::Generic::Position do let(:test_class) { Class.new { include Languages::Generic::Position }} it "can add positions" do a = test_class[1,2] b = test_class[2,3] expect(a+b).to eq(test_class[3,5]) end it "can compare positions" do a = test_class[1,2] b = test_class[1,2] expect(a).to eq(b) end it "can take elements from array" do a = [1,2] b = test_class[1,2] c = test_class.from_array a expect(c).to eq(b) end end
Version data entries
3 entries across 3 versions & 1 rubygems