repo.or.cz
/
rbx.git
/
blob
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
log
|
graphiclog1
|
graphiclog2
|
commit
|
commitdiff
|
tree
|
refs
|
edit
|
fork
history
|
raw
|
HEAD
Change soft-fail to use the config, rather than env
[rbx.git]
/
spec
/
frozen
/
1.8
/
language
/
line_spec.rb
blob
c2255a2cdb168b51f8e3f61ecdbcf8a27de5cdef
1
require File.dirname(__FILE__) + '/../spec_helper'
2
3
describe "The __LINE__ constant" do
4
it "increments for each line" do
5
cline = __LINE__
6
__LINE__.should == cline + 1
7
# comment is at cline + 2
8
__LINE__.should == cline + 3
9
end
10
11
it "is eval aware" do
12
eval("__LINE__").should == 1
13
cmd =<<EOF
14
# comment at line 1
15
__LINE__
16
EOF
17
eval(cmd).should == 2
18
end
19
end