Sha256: 26788bd19c2056185453dee7b9e6c6e6c40c279933e7270764d25f87f5145335
Contents?: true
Size: 1.36 KB
Versions: 15
Compression:
Stored size: 1.36 KB
Contents
RSpec.describe RuboCop::Cop::RSpec::AlignRightLetBrace do subject(:cop) { described_class.new } it 'registers offense for unaligned braces' do expect_offense(<<-RUBY) let(:foo) { a } ^ Align right let brace let(:hi) { ab } ^ Align right let brace let(:blahblah) { abcd } let(:thing) { ignore_this } let(:other) { ignore_this_too } describe 'blah' do let(:blahblah) { a } ^ Align right let brace let(:blah) { bc } ^ Align right let brace let(:a) { abc } end RUBY end offensive_source = <<-RUBY let(:foo) { a } let(:hi) { ab } let(:blahblah) { abcd } let(:thing) { ignore_this } let(:other) { ignore_this_too } describe 'blah' do let(:blahblah) { a } let(:blah) { bc } let(:a) { abc } end RUBY corrected_source = <<-RUBY let(:foo) { a } let(:hi) { ab } let(:blahblah) { abcd } let(:thing) { ignore_this } let(:other) { ignore_this_too } describe 'blah' do let(:blahblah) { a } let(:blah) { bc } let(:a) { abc } end RUBY include_examples 'autocorrect', offensive_source, corrected_source end
Version data entries
15 entries across 15 versions & 1 rubygems