Permalink
Browse files

Add specs for rb_enc_get_index

  • Loading branch information...
dbussink committed Oct 11, 2012
1 parent ee4fa24 commit 9781e96780ec6c5a5de7f75ee7c7a01f41a41522
Showing with 5 additions and 1 deletion.
  1. +5 −1 spec/ruby/optional/capi/encoding_spec.rb
@@ -149,9 +149,13 @@
@s.send(@method, :symbol).should >= 0
end
- it "returns the index of NULL" do
+ it "returns -1 as the index of nil" do
@s.send(@method, nil).should == -1
end
+
+ it "returns -1 as the index for immediates" do
+ @s.send(@method, 1).should == -1
+ end
end
describe "rb_enc_set_index" do

0 comments on commit 9781e96

Please sign in to comment.