Sha256: 8a092c7483a232d4feb6e2558f51a0aa23b664f9776b331cd07d682238a15c88

Contents?: true

Size: 450 Bytes

Versions: 7

Compression:

Stored size: 450 Bytes

Contents

require 'spec_helper'
require 'reek/source/sexp_formatter'

include Reek::Source

describe SexpFormatter do
  describe "::format" do
    it 'formats a simple s-expression' do
      result = SexpFormatter.format s(:lvar, :foo)
      result.should == "foo"
    end

    it 'formats a more complex s-expression' do
      result = SexpFormatter.format s(:call, nil, :foo, s(:arglist, s(:lvar, :bar)))
      result.should == "foo(bar)"
    end
  end
end

Version data entries

7 entries across 7 versions & 1 rubygems

Version Path
reek-1.3.8 spec/reek/source/sexp_formatter_spec.rb
reek-1.3.7 spec/reek/source/sexp_formatter_spec.rb
reek-1.3.6 spec/reek/source/sexp_formatter_spec.rb
reek-1.3.5 spec/reek/source/sexp_formatter_spec.rb
reek-1.3.4 spec/reek/source/sexp_formatter_spec.rb
reek-1.3.3 spec/reek/source/sexp_formatter_spec.rb
reek-1.3.2 spec/reek/source/sexp_formatter_spec.rb