Sha256: 40bf5e9efd40364dd6b9a329b63fae1c185edb9a2cd4d4924f12cd489796d689
Contents?: true
Size: 1.16 KB
Versions: 50
Compression:
Stored size: 1.16 KB
Contents
require 'spec_helper' describe SCSSLint::Location do let(:engine) { described_class.new(css) } describe '#<=>' do let(:locations) do [ SCSSLint::Location.new(2, 2, 2), SCSSLint::Location.new(2, 2, 1), SCSSLint::Location.new(2, 1, 2), SCSSLint::Location.new(2, 1, 1), SCSSLint::Location.new(1, 2, 2), SCSSLint::Location.new(1, 2, 1), SCSSLint::Location.new(1, 1, 2), SCSSLint::Location.new(1, 1, 1) ] end it 'allows locations to be sorted' do locations.sort.should == [ SCSSLint::Location.new(1, 1, 1), SCSSLint::Location.new(1, 1, 2), SCSSLint::Location.new(1, 2, 1), SCSSLint::Location.new(1, 2, 2), SCSSLint::Location.new(2, 1, 1), SCSSLint::Location.new(2, 1, 2), SCSSLint::Location.new(2, 2, 1), SCSSLint::Location.new(2, 2, 2) ] end context 'when the same location is passed' do let(:location) { SCSSLint::Location.new(1, 1, 1) } let(:other_location) { SCSSLint::Location.new(1, 1, 1) } it 'returns 0' do (location <=> other_location).should == 0 end end end end
Version data entries
50 entries across 50 versions & 3 rubygems