Sha256: 47b63ce6f6e049e44987a10ba074a024955fc46b71103551ea37a77c0700d344
Contents?: true
Size: 779 Bytes
Versions: 1
Compression:
Stored size: 779 Bytes
Contents
require File.dirname(__FILE__) + '/../spec_helper.rb' require 'reek/code_parser' require 'reek/sexp_formatter' include Reek def should_print(example) it "should format #{example} correctly" do sexp = CodeParser.parse_tree_for(example) SexpFormatter.format(sexp).should == example end end describe SexpFormatter do should_print 'self' should_print 'Alpha' should_print 'Alpha::Beta' should_print '@@fred' should_print '`ls`' should_print 'array[0]' should_print 'array[0, 1, 2]' should_print 'obj.method(arg1, arg2)' should_print 'obj.method' should_print '$1' should_print 'o = q.downcase' should_print 'true' should_print '"-#{q}xxx#{z.size}"' should_print '(0..5)' should_print '(0..temp)' should_print 'result[opt] = false' end
Version data entries
1 entries across 1 versions & 1 rubygems
Version | Path |
---|---|
kevinrutherford-reek-1.1.1 | spec/reek/sexp_formatter_spec.rb |