Sha256: 4b51f09c75b5afb7a298edf5866f95b7a9e8c4bb923b2f8c630129334e9c080f
Contents?: true
Size: 819 Bytes
Versions: 22
Compression:
Stored size: 819 Bytes
Contents
require 'lib/ramaze/spec/helper/snippets' describe "Ramaze#caller_info" do before do @file = File.expand_path(File.join(File.dirname(__FILE__), '../../../lib/ramaze/gestalt.rb')) end it 'should show line numbers' do res = Ramaze.caller_lines(@file, 68, 2) res.size.should == 5 res.map{|e| e[0]}.should == (66..70).to_a end it 'should show which line we asked for' do res = Ramaze.caller_lines(@file, 68, 2) res.size.should == 5 res.map {|e| e[2]}.should == [false,false,true,false,false] end it 'should show the code' do res = Ramaze.caller_lines(__FILE__, __LINE__, 1) res.size.should == 3 res.map {|e| e[1].strip}.should == [ "it 'should show the code' do", "res = Ramaze.caller_lines(__FILE__, __LINE__, 1)", "res.size.should == 3" ] end end
Version data entries
22 entries across 22 versions & 5 rubygems
Version | Path |
---|---|
ramaze-2009.02 | spec/snippets/ramaze/caller_lines.rb |
ramaze-2009.03 | spec/snippets/ramaze/caller_lines.rb |