Class: RSpecify::Runner

Inherits:
Thor
  • Object
show all
Defined in:
lib/rspecify/runner.rb

Instance Method Summary collapse

Instance Method Details

#cat(path) ⇒ Object



7
8
9
10
11
12
13
14
# File 'lib/rspecify/runner.rb', line 7

def cat(path)
  sexp = RubyParser.new.parse(File.read(path))
  sexp = RSpecify::Transformer.new.transform(sexp)
  RubyScribe::Emitter.new.tap do |emitter|
    emitter.methods_without_parenthesis += ["it", "describe", "context", "should", "should_not"]
    puts emitter.emit(sexp)
  end
end