Permalink
Browse files

Patch from jc00ke fixing should and quotes in rbx specs.

  • Loading branch information...
1 parent 1fc1d1e commit 7f39ba4cfb748a719945ed8211143aaafc4b5dde @brixen brixen committed Jan 15, 2012
@@ -1,7 +1,7 @@
require File.expand_path('../../../spec_helper', __FILE__)
describe "FFI::Pointer#size" do
- it "should match 1.size" do
+ it "matches 1.size" do
FFI::Pointer.size.should == 1.size
end
end
@@ -16,8 +16,10 @@
KernelSpecs.run_cache(@cache).should == "Object:Object"
end
- it "should not use the cache if the line-number differs" do
- eval("__LINE__", binding, "(file)", 1).should == 1
- eval("__LINE__", binding, "(file)", 2).should == 2
+ describe "when line-number differs" do
+ it "does not use the cache" do
+ eval("__LINE__", binding, "(file)", 1).should == 1
+ eval("__LINE__", binding, "(file)", 2).should == 2
+ end
end
end
@@ -3,17 +3,17 @@
describe "Rubinius::Type.coerce_to_symbol" do
ruby_version_is ''...'1.9' do
- it 'raises TypeError if the coercion fails' do
+ it "raises TypeError if the coercion fails" do
lambda { Rubinius::Type.coerce_to_symbol nil }.should raise_error(TypeError)
end
- it 'raises ArgumentError if supplied with a Fixnum' do
+ it "raises ArgumentError if supplied with a Fixnum" do
lambda { Rubinius::Type.coerce_to_symbol 42 }.should raise_error(ArgumentError)
end
end
ruby_version_is '1.9' do
- it 'always raises TypeError if the coercion fails' do
+ it "always raises TypeError if the coercion fails" do
lambda { Rubinius::Type.coerce_to_symbol nil }.should raise_error(TypeError)
lambda { Rubinius::Type.coerce_to_symbol 42 }.should raise_error(TypeError)
end
@@ -1,18 +1,18 @@
describe "Regexps with capture group modifers" do
- describe '/.../ (named group is not used, no option)' do
- it 'treats (...) as a captured group' do
+ describe "/.../ (named group is not used, no option)" do
+ it "treats (...) as a captured group" do
/foo(bar)/.match('foobar').captures.should == ['bar']
end
end
- describe '/.../g (named group is not used, "g" option)' do
- it 'treats (...) as a non-captured group (?...)' do
+ describe "/.../g (named group is not used, 'g' option)" do
+ it "treats (...) as a non-captured group (?...)" do
/foo(bar)/g.match('foobar').captures.should == []
end
end
- describe '/..(?<name>..)../ (named group is used, no option)' do
- it 'treats (...) as a non-captured group (?:...)' do
+ describe "/..(?<name>..)../ (named group is used, no option)" do
+ it "treats (...) as a non-captured group (?:...)" do
/(foo)(?<name>bar)(duh)/.match('foobarduh').captures.should == ['bar']
end
@@ -21,21 +21,21 @@
end
end
- describe '/..(?<name>..)../G (named group is used, "G" option)' do
- it 'treats (...) as a captured group' do
+ describe "/..(?<name>..)../G (named group is used, 'G' option)" do
+ it "treats (...) as a captured group" do
/(foo)(?<name>bar)(duh)/G.match('foobarduh').captures.should == ['foo', 'bar', 'duh']
end
- it 'allows numbered-backref/call' do
+ it "allows numbered-backref/call" do
/(foo)(?<name>bar)(\1)/G.match('foobarfoo').captures.should == ['foo', 'bar', 'foo']
end
end
- it 'instantiates a Regexp with a flag equivalent to /g' do
+ it "instantiates a Regexp with a flag equivalent to /g" do
Regexp.new('', Regexp::DONT_CAPTURE_GROUP).options.should == //g.options
end
- it 'instantiates a Regexp with a flag equivalent to /G' do
+ it "instantiates a Regexp with a flag equivalent to /G" do
Regexp.new('', Regexp::CAPTURE_GROUP).options.should == //G.options
end
end

0 comments on commit 7f39ba4

Please sign in to comment.