Sha256: fad967ebc2216b8972f65daf7b3dc68ebec634f27d4c63092431ac85edd86fb3
Contents?: true
Size: 697 Bytes
Versions: 2
Compression:
Stored size: 697 Bytes
Contents
require 'spec_helper' describe 'ParseTreeStrategy' do before :each do @parse_tree = double 'ParseTree' @sexp_processor = double 'SexpProcessor' @strategy = VirtualKeywords::ParseTreeStrategy.new( @parse_tree, @sexp_processor) end it 'runs the ParseTree parser, then converts the result into a sexp' do klass = :foo method_name = :bar parse_result = :parsed result = :sexp @parse_tree.should_receive(:translate).with(klass, method_name). and_return parse_result @sexp_processor.should_receive(:process).with(parse_result). and_return result @strategy.translate_instance_method(klass, method_name).should eql result end end
Version data entries
2 entries across 2 versions & 1 rubygems
Version | Path |
---|---|
virtual_keywords-0.3.1 | lib/spec/parser_strategy_spec.rb |
virtual_keywords-0.3.0 | lib/spec/parser_strategy_spec.rb |