Sha256: 50bde12eb06d1c6baca416752de01eb898ff140e5233f598709e2ab3fd5b1b53
Contents?: true
Size: 921 Bytes
Versions: 15
Compression:
Stored size: 921 Bytes
Contents
require 'spec_helper' module WLang class Compiler describe Autospacing::RightStrip do def optimize(source) Autospacing::RightStrip.new.call(source) end it 'does not touch single line statics' do source = [:static, "Hello World"] expected = [:static, "Hello World"] optimize(source).should eq(expected) end it 'strips at right on :static' do source = [:static, "Hello World \n "] expected = [:static, "Hello World"] optimize(source).should eq(expected) end it 'strips the right-most :static on :strconcat' do source = [:strconcat, [:static, "Hello \n"], [:static, " World\n"]] expected = [:strconcat, [:static, "Hello \n"], [:static, " World"]] optimize(source).should eq(expected) end end # describe Autospacing::RightStrip end # class Compiler end # module WLang
Version data entries
15 entries across 15 versions & 1 rubygems