This repository was archived by the owner on Dec 4, 2023. It is now read-only.
File tree Expand file tree Collapse file tree
Expand file tree Collapse file tree Original file line number Diff line number Diff line change @@ -2,10 +2,11 @@ source 'http://rubygems.org'
22
33gemspec
44
5- gem "rubysl" , :platforms => :rbx
6- gem 'redjs' , :git => 'https://github.com/cowboyd/redjs.git'
7- gem "rake"
8- gem "rspec" , "~> 2.0"
9- gem "rake-compiler"
10- gem "gem-compiler" , :platforms => :mri
11-
5+ group :development do
6+ gem "rubysl" , :platforms => :rbx
7+ gem 'redjs' , :git => 'https://github.com/cowboyd/redjs.git'
8+ gem "rake"
9+ gem "rspec" , "~> 2.0"
10+ gem "rake-compiler"
11+ gem "gem-compiler" , :platforms => :mri
12+ end
Original file line number Diff line number Diff line change 99 a . Length ( ) . should eql 0
1010 a . Set ( 0 , o )
1111 a . Length ( ) . should eql 1
12- a . Get ( 0 ) . Equals ( o ) . should be_true
12+ a . Get ( 0 ) . Equals ( o ) . should be_truthy
1313 end
1414
1515 it "can be initialized with a length" do
Original file line number Diff line number Diff line change 22
33describe V8 ::C ::Locker do
44 it "can lock and unlock the VM" do
5- V8 ::C ::Locker ::IsLocked ( ) . should be_false
5+ V8 ::C ::Locker ::IsLocked ( ) . should be_falsey
66 V8 ::C ::Locker ( ) do
7- V8 ::C ::Locker ::IsLocked ( ) . should be_true
7+ V8 ::C ::Locker ::IsLocked ( ) . should be_truthy
88 V8 ::C ::Unlocker ( ) do
9- V8 ::C ::Locker ::IsLocked ( ) . should be_false
9+ V8 ::C ::Locker ::IsLocked ( ) . should be_falsey
1010 end
1111 end
12- V8 ::C ::Locker ::IsLocked ( ) . should be_false
12+ V8 ::C ::Locker ::IsLocked ( ) . should be_falsey
1313 end
1414
1515 it "properly unlocks if an exception is thrown inside a lock block" do
1818 raise "boom!"
1919 end
2020 rescue
21- V8 ::C ::Locker ::IsLocked ( ) . should be_false
21+ V8 ::C ::Locker ::IsLocked ( ) . should be_falsey
2222 end
2323 end
2424
2929 raise "boom!"
3030 end
3131 rescue
32- V8 ::C ::Locker ::IsLocked ( ) . should be_true
32+ V8 ::C ::Locker ::IsLocked ( ) . should be_truthy
3333 end
3434 end
3535 end
Original file line number Diff line number Diff line change 2626 callback_data = V8 ::C ::String ::New ( "I am Legend" )
2727 left = V8 ::C ::String ::New ( "Yo! " )
2828 getter = proc do |name , info |
29- info . This ( ) . StrictEquals ( o ) . should be_true
30- info . Holder ( ) . StrictEquals ( o ) . should be_true
29+ info . This ( ) . StrictEquals ( o ) . should be_truthy
30+ info . Holder ( ) . StrictEquals ( o ) . should be_truthy
3131 V8 ::C ::String ::Concat ( left , info . Data ( ) )
3232 end
3333 setter = proc do |name , value , info |
Original file line number Diff line number Diff line change 1717 name = V8 ::C ::String ::New ( "<spec>" )
1818 origin = V8 ::C ::ScriptOrigin . new ( name )
1919 data = V8 ::C ::ScriptData ::PreCompile ( source , source . length )
20- data . HasError ( ) . should be_false
20+ data . HasError ( ) . should be_falsey
2121 script = V8 ::C ::Script ::New ( V8 ::C ::String ::New ( source ) , origin , data )
2222 script . Run ( ) . should eql 42
2323 end
2424
2525 it "can detect errors in the script data" do
2626 source = "^ = ;"
2727 data = V8 ::C ::ScriptData ::PreCompile ( source , source . length )
28- data . HasError ( ) . should be_true
28+ data . HasError ( ) . should be_truthy
2929 end
3030end
Original file line number Diff line number Diff line change 66 describe V8 ::C ::FunctionTemplate do
77 it "can be created with no arguments" do
88 t = V8 ::C ::FunctionTemplate ::New ( )
9- t . GetFunction ( ) . Call ( @cxt . Global ( ) , [ ] ) . StrictEquals ( @cxt . Global ( ) ) . should be_true
9+ t . GetFunction ( ) . Call ( @cxt . Global ( ) , [ ] ) . StrictEquals ( @cxt . Global ( ) ) . should be_truthy
1010 end
1111
1212 it "can be created with a callback" do
1616 arguments . Length ( ) . should be ( 2 )
1717 arguments [ 0 ] . Utf8Value ( ) . should eql 'one'
1818 arguments [ 1 ] . Utf8Value ( ) . should eql 'two'
19- arguments . Callee ( ) . StrictEquals ( f ) . should be_true
20- arguments . This ( ) . StrictEquals ( receiver ) . should be_true
21- arguments . Holder ( ) . StrictEquals ( receiver ) . should be_true
22- arguments . IsConstructCall ( ) . should be_false
19+ arguments . Callee ( ) . StrictEquals ( f ) . should be_truthy
20+ arguments . This ( ) . StrictEquals ( receiver ) . should be_truthy
21+ arguments . Holder ( ) . StrictEquals ( receiver ) . should be_truthy
22+ arguments . IsConstructCall ( ) . should be_falsey
2323 arguments . Data ( ) . Value ( ) . should be ( 42 )
2424 V8 ::C ::String ::New ( "result" )
2525 end
Original file line number Diff line number Diff line change 2424 filename = V8 ::C ::String ::New ( "<eval>" )
2525 script = V8 ::C ::Script ::New ( source , filename )
2626 result = script . Run ( )
27- trycatch . HasCaught ( ) . should be_true
28- trycatch . CanContinue ( ) . should be_true
27+ trycatch . HasCaught ( ) . should be_truthy
28+ trycatch . CanContinue ( ) . should be_truthy
2929 exception = trycatch . Exception ( )
3030 exception . should_not be_nil
31- exception . IsNativeError ( ) . should be_true
31+ exception . IsNativeError ( ) . should be_truthy
3232 trycatch . StackTrace ( ) . Utf8Value ( ) . should match /boom.*three.*two.*one/m
3333 message = trycatch . Message ( ) ;
3434 message . should_not be_nil
4444 frame . GetColumn ( ) . should eql 15
4545 frame . GetScriptName ( ) . Utf8Value ( ) . should eql "<eval>"
4646 frame . GetScriptNameOrSourceURL ( ) . Utf8Value ( ) . should eql "<eval>"
47- frame . IsEval ( ) . should be_false
48- stack . GetFrame ( 4 ) . IsEval ( ) . should be_true
49- frame . IsConstructor ( ) . should be_false
47+ frame . IsEval ( ) . should be_falsey
48+ stack . GetFrame ( 4 ) . IsEval ( ) . should be_truthy
49+ frame . IsConstructor ( ) . should be_falsey
5050 end
5151 end
5252end
Original file line number Diff line number Diff line change @@ -5,6 +5,6 @@ module RedJS
55 Error = V8 ::Error
66end
77describe V8 ::Context do
8- pending "not ready for prime-time"
8+ skip "not ready for prime-time"
99 #it_behaves_like 'RedJS::Context'
10- end
10+ end
You can’t perform that action at this time.
0 commit comments