Sha256: f6b8f8447c95e03bf4bf3bc54c0f83ccaa18b1316ce5181d16234d54d9fef580
Contents?: true
Size: 830 Bytes
Versions: 2
Compression:
Stored size: 830 Bytes
Contents
require_relative '../../spec_helper' require 'tailor/rulers/spaces_after_comma_ruler' describe Tailor::Rulers::SpacesAfterCommaRuler do subject { Tailor::Rulers::SpacesAfterCommaRuler.new(nil, {}) } describe "#comma_update" do it "adds the column number to @comma_columns" do subject.comma_update(",", 2, 1) subject.instance_variable_get(:@comma_columns).should == [1] end end describe "#check_spaces_after_comma" do context "no event after comma" do let(:lexed_line) do l = double "LexedLine" l.stub(:event_at) l.stub(:index) l end it "doesn't detect any problems" do Tailor::Problem.should_not_receive(:new) expect { subject.check_spaces_after_comma(lexed_line, 1) }. to_not raise_error end end end end
Version data entries
2 entries across 2 versions & 1 rubygems
Version | Path |
---|---|
tailor-1.0.1 | spec/tailor/rulers/spaces_after_comma_ruler_spec.rb |
tailor-1.0.0 | spec/tailor/rulers/spaces_after_comma_ruler_spec.rb |