Sha256: 1bce6377c20c9910c178677758311e3c88720fa20758290f52deaa0f52228761
Contents?: true
Size: 1.12 KB
Versions: 1
Compression:
Stored size: 1.12 KB
Contents
require 'rubygems' require 'sane' require_relative '../lib/display' require 'spec/autorun' describe "display" do before do a = 3 b=4 @output = display a, b end it "should display the args" do assert @output.contain?( "a=") assert @output.contain?( "b=") end it "should have an [] style output" do assert @output =~ /\[.*\]/ end it "should add spacing appropriately with commas" do assert @output.contain?(", ") end it "should show linenumber too" do assert @output.contain?(",11") end it "should retrieve call nodes for ya" do for string in ["c = display a, b", "display a, b"] do parser=RedParse.new(string) tree = parser.parse node = give_me_first_call_node tree assert node.class == RedParse::CallNode assert node.params.length == 2 end end it "shouldn't barf with more complex things" do output = display 3, 4+5 end it "should work with longer dir names in 1.8" do require 'sub/go2' end it "should cache lines instead of rereading the file each time" end
Version data entries
1 entries across 1 versions & 1 rubygems
Version | Path |
---|---|
display-0.2.0 | spec/spec.display.rb |