Permalink
Browse files

Add the rest of spec/* directories to CI process.

  • Loading branch information...
1 parent 1900456 commit f26bb0c4e3b8435a853a9f4843173748d98075fd Brian Ford committed Feb 25, 2008
View
1 .gitignore
@@ -19,7 +19,6 @@ stamp-h1
tmtags
*.rbc
.spec/bm.yml
-spec/fixtures/load/load_spec_rba.rba
spec/ruby/1.8/core/dir/fixtures/mock
stats
tmp
View
3 bin/mspec
@@ -3,6 +3,9 @@
ENV["CI_FILES"] = ['spec/ruby/1.8/core',
'spec/ruby/1.8/language',
'spec/compiler',
+ 'spec/core',
+ 'spec/debugger',
+ 'spec/subtend',
'spec/ruby/1.8/library',
# parser specs cause odd problems with library
# specs, so they go last
View
7 spec/core/array/allocate_spec.rb
@@ -1,7 +0,0 @@
-require File.dirname(__FILE__) + '/../../spec_helper'
-
-describe "Array.allocate" do
- it "creates an instance with the correct number of fields" do
- Array.allocate.fields.should == Array.instance_fields
- end
-end
View
15 spec/core/bignum/coerce_spec.rb
@@ -8,11 +8,14 @@
end
it "returns [Float, Float] if other is not a Bignum or Fixnum" do
- a = bignum_value.coerce("2")
- a.inspect.should == "[2.0, 9.22337203685478e+18]"
- a.collect { |i| i.class }.should == [Float, Float]
- b = bignum_value.coerce(1.5)
- b.inspect.should == "[1.5, 9.22337203685478e+18]"
- b.collect { |i| i.class }.should == [Float, Float]
+ a, b = c = bignum_value.coerce("2")
+ a.should be_close(2.0, TOLERANCE)
+ b.should be_close(9223372036854775808.000, TOLERANCE)
+ c.collect { |i| i.class }.should == [Float, Float]
+
+ a, b = c = bignum_value.coerce(1.5)
+ a.should be_close(1.5, TOLERANCE)
+ b.should be_close(9223372036854775808.000, TOLERANCE)
+ c.collect { |i| i.class }.should == [Float, Float]
end
end
View
4 spec/core/bytearray/new_spec.rb
@@ -2,6 +2,8 @@
describe "ByteArray.new" do
it "creates an instance with the correct number of fields" do
- ByteArray.new(16).fields.should == 4
+ ba = ByteArray.new(16)
+ ba.should be_kind_of(ByteArray)
+ ba.size.should >= 16
end
end
View
4 spec/core/enumerable/count_spec.rb
@@ -1,7 +1,6 @@
require File.dirname(__FILE__) + '/../../spec_helper'
describe "Enumerable#count" do
-
# Assuming array doesn't override count. If this changes, use
# EachDefiner from core/enumerable/fixtures/classes.rb
@@ -22,5 +21,4 @@
ary = [1, 2, 4, 2]
ary.count{|x|x%2==0}.should == 3
end
-
-end
+end
View
18 spec/core/kernel/StringValue_spec.rb
@@ -1,9 +1,9 @@
require File.dirname(__FILE__) + '/../../spec_helper'
+require File.dirname(__FILE__) + '/fixtures/classes'
describe "Kernel.StringValue" do
it "raises TypeError if the instance does not respond to to_str" do
- class A; end
- lambda { StringValue(A.new) }.should raise_error(TypeError)
+ lambda { StringValue(KernelSpecs::A.new) }.should raise_error(TypeError)
end
it "raises TypeError for nil" do
@@ -15,20 +15,10 @@ class A; end
end
it "raises TypeError if the instance responds to to_str but doesn't return a String" do
- class B
- def to_str
- 1
- end
- end
- lambda { StringValue(B.new) }.should raise_error(TypeError)
+ lambda { StringValue(KernelSpecs::B.new) }.should raise_error(TypeError)
end
it "calls to_str if the instance responds to it" do
- class C
- def to_str
- "zam"
- end
- end
- StringValue(C.new).should == "zam"
+ StringValue(KernelSpecs::C.new).should == "zam"
end
end
View
15 spec/core/kernel/fixtures/classes.rb
@@ -0,0 +1,15 @@
+module KernelSpecs
+ class A; end
+
+ class B
+ def to_str
+ 1
+ end
+ end
+
+ class C
+ def to_str
+ "zam"
+ end
+ end
+end
View
12 spec/core/kernel/load_spec.rb
@@ -1,8 +1,8 @@
require File.dirname(__FILE__) + '/../../spec_helper'
-$load_fixture_dir = (File.dirname(__FILE__) + '/../../fixtures/load')
+$load_fixture_dir = (File.dirname(__FILE__) + '/../../ruby/1.8/fixtures/load')
$LOAD_PATH << $load_fixture_dir
-$LOAD_PATH << (File.dirname(__FILE__) + '/../../fixtures/load/load_spec_rba.rba')
+$LOAD_PATH << (File.dirname(__FILE__) + '/../../ruby/1.8/fixtures/load/load_spec_rba.rba')
$load_spec_1 = nil
$load_spec_2 = nil
@@ -29,12 +29,10 @@
`rm -f ./*.rbc`
end
- compliant_on :rubinius do
- Kernel.compile($load_fixture_dir + '/load_spec_10.rb')
+ Kernel.compile($load_fixture_dir + '/load_spec_10.rb')
- Dir.chdir($load_fixture_dir) do |dir|
- `zip load_spec_rba.rba load_spec_10.rbc`
- end
+ Dir.chdir($load_fixture_dir) do |dir|
+ `zip load_spec_rba.rba load_spec_10.rbc`
end
end
View
10 spec/core/matchdata/element_reference_spec.rb
@@ -1,10 +0,0 @@
-require File.dirname(__FILE__) + '/../../spec_helper'
-
-describe "MatchData#[]" do
- it "provides access to named groups" do
- r = Regexp.new("(?<section>...)(?<code>\d+)")
- m = r.match("THX1138")
- m[:section] == "THX"
- m[:code] == "1138"
- end
-end
View
17 spec/core/module/const_defined_spec.rb
@@ -1,17 +0,0 @@
-require File.dirname(__FILE__) + '/../../spec_helper'
-
-describe "Module#const_defined?" do
- it "returns true if the name is defined" do
- class Blah
- class Whee
- end
- end
-
- Object.const_defined?(:Object).should == true
- Blah.const_defined?("Whee").should == true
-
- # MRI doesn't allow Blah::Whee
- Object.const_defined?("Blah::Whee").should == true
- Object.const_defined?("Blah::Zargle").should == false
- end
-end
View
19 spec/core/module/instance_methods_spec.rb
@@ -1,19 +0,0 @@
-require File.dirname(__FILE__) + '/../../spec_helper'
-
-describe "Module#instance_methods" do
- it "excludes super class instance methods when passed false" do
- class A
- def foo
- end
- end
- A.instance_methods(false).should == ["foo"]
- end
-
- it "returns all instance methods of a module when not passed an argument" do
- module B
- def foo
- end
- end
- B.instance_methods.should include("foo")
- end
-end
View
56 spec/core/proc/given_spec.rb
@@ -1,56 +0,0 @@
-require File.dirname(__FILE__) + '/../../spec_helper'
-
-describe "A Proc instance created using Proc.given" do
- it "is nil if no block given" do
- def answer
- Proc.given.nil?
- end
-
- answer.should == true
- end
-
- it "references the same block" do
- def answer(&prc)
- prc.block.object_id == Proc.given.block.object_id
- end
-
- answer {}.should == true
- end
-
- it "is able to call the block" do
- def answer(&prc)
- a = [prc.nil?, Proc.given.nil?]
- a << (!block_given? == Proc.given.nil?)
- if block_given?
- a << (prc.object_id == Proc.given.object_id)
- a << (prc.block.object_id == Proc.given.block.object_id)
- a << Proc.given.call(21)
- end
- a
- end
-
- answer.should == [true, true, true]
- answer { |n| n * 2}.should == [false, false, true, false, true, 42]
- end
-
- it "can do the mind trick using a MethodContext" do
- @message = ''
- def stormtrooper
- yield "Let me see your identification."
- obiwan { |reply| @message << "Obi-Wan: #{reply}" }
- end
-
- def obiwan
- yield "[with a small wave of his hand] You don't need to see his identification."
- ctx = MethodContext.current.sender
- Proc.given(ctx).call("We don't need to see his identification.")
- end
-
- message = "Stormtrooper: Let me see your identification." \
- "Obi-Wan: [with a small wave of his hand] You don't need to see his identification." \
- "Stormtrooper: We don't need to see his identification."
-
- stormtrooper { |msg| @message << "Stormtrooper: #{msg}" }
- @message.should == message
- end
-end
View
2 ...rnel/bootstrap/vm/coerce_to_array_spec.rb → spec/core/vm/coerce_to_array_spec.rb
@@ -1,4 +1,4 @@
-require File.dirname(__FILE__) + '/../../../spec_helper'
+require File.dirname(__FILE__) + '/../../spec_helper'
describe "Rubinius::VM#coerce_to_array" do
it "returns the Array passed to it" do
View
5 spec/ruby/1.8/fixtures/load/.gitignore
@@ -1,4 +1,5 @@
-load_spec_dynamic.rb
-load_spec_dynamic.rbc
+*.rba
*.rbc
*.old
+*dummy*
+*dynamic*
View
9 spec/subtend/define_method_vis_spec.rb
@@ -49,19 +49,18 @@ def test_s
m.include?("smv_test_protected").should == true # note this is true..?
m.include?("smv_test_private").should == false
end
-
+
specify "should have protected method smv_test_protected" do
m = @c.protected_methods
m.include?("smv_test_public").should == false
m.include?("smv_test_protected").should == true
m.include?("smv_test_private").should == false
end
-
- specify "should have private method smb_test_private" do
+
+ specify "should have private method smv_test_private" do
m = @c.private_methods
m.include?("smv_test_public").should == false
m.include?("smv_test_protected").should == false
m.include?("smv_test_private").should == true
- end
-
+ end
end
View
1 spec/tags/core/breakpoint/calculate_target_breakpoint_tags.txt
@@ -0,0 +1 @@
+fails:StepBreakpoint#calculate_step_breakpoint given a valid line outside the current method, ???
View
2 spec/tags/core/compiledmethod/decode_tags.txt
@@ -0,0 +1,2 @@
+fails:CompiledMethod::Instruction #opcode returns a symbol representing the opcode for the corresponding instruction
+fails:CompiledMethod::Instruction #args returns an array containing the opcode arguments
View
3 spec/tags/core/context/reload_method_tags.txt
@@ -0,0 +1,3 @@
+fails:MethodContext#reload_method modifying the CompiledMethod bytecodes without compiling does not effect the context
+fails:MethodContext#reload_method modifying the CompiledMethod bytecodes and compiling updates the context
+fails:MethodContext#reload_method reloads the compiled instruction sequence from the context's CompiledMethod
View
4 spec/tags/core/context/set_iseq_tags.txt
@@ -0,0 +1,4 @@
+fails:MethodContext#set_iseq changes the iseq for the receiving context only
+fails:MethodContext#set_iseq insulates the receiving context from changes to the compiled method
+fails:MethodContext#set_iseq changes to the iseq persist across calls to blocks
+fails:MethodContext#set_iseq changes to the iseq persist across calls to other methods
View
2 spec/tags/core/kernel/load_tags.txt
@@ -0,0 +1,2 @@
+fails:Kernel#load generates a .rbc but no .rb file if using a file with no extension (appends .rbc)
+fails:Kernel#load generates a .rbc file if using a file with an arbitrary extension (appends .rbc)
View
1 spec/tags/core/task/debug_context_change_tags.txt
@@ -0,0 +1 @@
+fails:Task#debug_context_change behavior yields to the debugger at the point an exception is raised
View
1 spec/tags/core/task/get_stack_value_tags.txt
@@ -0,0 +1 @@
+fails:Task#get_stack_value throws an ArgumentError if depth is out of range
View
0 ...nel/bootstrap/vm/coerce_to_array_tags.txt → spec/tags/core/vm/coerce_to_array_tags.txt
File renamed without changes.
View
2 spec/tags/ruby/1.8/library/ipaddr/reverse_tags.txt
@@ -0,0 +1,2 @@
+fails(This spec runs way too slow):IPAddr#reverse should be able to generate the reverse DNS lookup entry
+fails(This spec runs way too slow):IPAddr#ip6_arpa should be able to convert an IPv6 address into the reverse DNS lookup representation according to RFC3172
View
1 spec/tags/subtend/define_alloc_func_tags.txt
@@ -0,0 +1 @@
+fails:SubtendAlloc (a class with an alloc func defined) calls the alloc func
View
5 spec/tags/subtend/define_method_vis_tags.txt
@@ -1 +1,6 @@
fails:SubtendMethodVisModule should inherit method function from mixin
+fails:SubtendMethodVis should have public method smv_test_public
+fails:SubtendMethodVis should have protected method smv_test_protected
+fails:SubtendMethodVis should have private method smv_test_private
+fails:SubtendMethodVisModule should have singleton method smv_test_singleton
+fails:SubtendMethodVisModule should not inherit singleton method from mixin

0 comments on commit f26bb0c

Please sign in to comment.