Skip to content
This repository was archived by the owner on Dec 4, 2023. It is now read-only.

Commit 292b053

Browse files
committed
upgrade rspec
1 parent e854a2f commit 292b053

8 files changed

Lines changed: 32 additions & 31 deletions

File tree

Gemfile

Lines changed: 8 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -2,10 +2,11 @@ source 'http://rubygems.org'
22

33
gemspec
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

spec/c/array_spec.rb

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -9,7 +9,7 @@
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

spec/c/locker_spec.rb

Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -2,14 +2,14 @@
22

33
describe 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
@@ -18,7 +18,7 @@
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

@@ -29,7 +29,7 @@
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

spec/c/object_spec.rb

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -26,8 +26,8 @@
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|

spec/c/script_spec.rb

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -17,14 +17,14 @@
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
3030
end

spec/c/template_spec.rb

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -6,7 +6,7 @@
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
@@ -16,10 +16,10 @@
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

spec/c/trycatch_spec.rb

Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -24,11 +24,11 @@
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
@@ -44,9 +44,9 @@
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
5252
end

spec/redjs_spec.rb

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -5,6 +5,6 @@ module RedJS
55
Error = V8::Error
66
end
77
describe 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

0 commit comments

Comments
 (0)