Skip to content

Commit 1c33709

Browse files
committedOct 29, 2013
Remove old rubyspec spec_helper clone
1 parent a466f8b commit 1c33709

24 files changed

+30
-125
lines changed
 

‎spec/ospec/mspec_fixes.rb

+29
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,5 @@
11
require 'mspec/mocks/mock'
2+
require 'mspec/guards/guard'
23

34
# 1. Opal does not support mutable strings
45
class ExceptionState
@@ -56,3 +57,31 @@ def Mock.install_method(obj, sym, type=nil)
5657

5758
proxy
5859
end
60+
61+
# 3. Waiting for: https://github.com/rubyspec/mspec/pull/40
62+
class SpecGuard
63+
def implementation?(*args)
64+
args.any? do |name|
65+
!!case name
66+
when :rubinius
67+
RUBY_NAME =~ /^rbx/
68+
when :ruby
69+
RUBY_NAME =~ /^ruby/
70+
when :jruby
71+
RUBY_NAME =~ /^jruby/
72+
when :ironruby
73+
RUBY_NAME =~ /^ironruby/
74+
when :macruby
75+
RUBY_NAME =~ /^macruby/
76+
when :maglev
77+
RUBY_NAME =~ /^maglev/
78+
when :topaz
79+
RUBY_NAME =~ /^topaz/
80+
when :opal
81+
RUBY_NAME =~ /^opal/
82+
else
83+
false
84+
end
85+
end
86+
end
87+
end
Has a conversation. Original line has a conversation.

‎spec/rubyspec/core/module/const_defined_spec.rb

-1
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,3 @@
1-
require File.expand_path('../../../spec_helper', __FILE__)
21
require File.expand_path('../../../fixtures/constants', __FILE__)
32

43
CD_CONST1 = :const1

‎spec/rubyspec/core/module/const_get_spec.rb

-1
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,3 @@
1-
require File.expand_path('../../../spec_helper', __FILE__)
21
require File.expand_path('../../../fixtures/constants', __FILE__)
32

43
CS_CONST1 = :const1

‎spec/rubyspec/core/module/const_missing_spec.rb

-1
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,3 @@
1-
require File.expand_path('../../../spec_helper', __FILE__)
21
require File.expand_path('../../../fixtures/constants', __FILE__)
32

43
describe "Module#const_missing" do

‎spec/rubyspec/core/module/const_set_spec.rb

-1
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,3 @@
1-
require File.expand_path('../../../spec_helper', __FILE__)
21
require File.expand_path('../../../fixtures/constants', __FILE__)
32

43
module ConstantSpecs

‎spec/rubyspec/core/module/method_defined_spec.rb

-1
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,3 @@
1-
require File.expand_path('../../../spec_helper', __FILE__)
21
require File.expand_path('../fixtures/classes', __FILE__)
32

43
describe "Module#method_defined?" do

‎spec/rubyspec/core/module/public_method_defined_spec.rb

-1
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,3 @@
1-
require File.expand_path('../../../spec_helper', __FILE__)
21
require File.expand_path('../fixtures/classes', __FILE__)
32

43
describe "Module#public_method_defined?" do

‎spec/rubyspec/core/module/remove_const_spec.rb

-1
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,3 @@
1-
require File.expand_path('../../../spec_helper', __FILE__)
21
require File.expand_path('../../../fixtures/constants', __FILE__)
32

43
describe "Module#remove_const" do

‎spec/rubyspec/core/module/undef_method_spec.rb

-1
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,3 @@
1-
require File.expand_path('../../../spec_helper', __FILE__)
21
require File.expand_path('../fixtures/classes', __FILE__)
32

43
module ModuleSpecs

‎spec/rubyspec/core/numeric/step_spec.rb

-3
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,3 @@
1-
require File.expand_path('../../../spec_helper', __FILE__)
2-
#require File.expand_path('../fixtures/classes', __FILE__)
3-
41
describe "Numeric#step" do
52
before :each do
63
ScratchPad.record []

‎spec/rubyspec/core/string/center_spec.rb

-3
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,4 @@
11
# -*- encoding: utf-8 -*-
2-
require File.expand_path('../../../spec_helper', __FILE__)
3-
require File.expand_path('../fixtures/classes.rb', __FILE__)
4-
52
describe "String#center with length, padding" do
63
it "returns a new string of specified length with self centered and padded with padstr" do
74
"one".center(9, '.').should == "...one..."

‎spec/rubyspec/core/string/element_reference_spec.rb

-1
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,3 @@
1-
require File.expand_path('../../../spec_helper', __FILE__)
21
require File.expand_path('../fixtures/classes', __FILE__)
32

43
describe "String#[]" do

‎spec/rubyspec/core/string/index_spec.rb

-1
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,4 @@
11
# -*- encoding: utf-8 -*-
2-
require File.expand_path('../../../spec_helper', __FILE__)
32
require File.expand_path('../fixtures/classes.rb', __FILE__)
43

54
describe "String#index" do

‎spec/rubyspec/core/string/ljust_spec.rb

-1
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,4 @@
11
# -*- encoding: utf-8 -*-
2-
require File.expand_path('../../../spec_helper', __FILE__)
32
require File.expand_path('../fixtures/classes.rb', __FILE__)
43

54
describe "String#ljust" do

‎spec/rubyspec/core/string/rjust_spec.rb

-1
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,4 @@
11
# -*- encoding: utf-8 -*-
2-
require File.expand_path('../../../spec_helper', __FILE__)
32
require File.expand_path('../fixtures/classes.rb', __FILE__)
43

54
describe "String#rjust with length, padding" do

‎spec/rubyspec/core/string/slice_spec.rb

+1-2
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,3 @@
1-
require File.expand_path('../../../spec_helper', __FILE__)
21
require File.expand_path('../fixtures/classes', __FILE__)
32

43
describe "String#slice" do
@@ -72,4 +71,4 @@
7271
"x".slice(-2, 0).should == nil
7372
"x".slice(-2, 1).should == nil
7473
end
75-
end
74+
end

‎spec/rubyspec/core/struct/initialize_spec.rb

-1
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,3 @@
1-
require File.expand_path('../../../spec_helper', __FILE__)
21
require File.expand_path('../fixtures/classes', __FILE__)
32

43
describe "Struct#initialize" do

‎spec/rubyspec/core/struct/new_spec.rb

-1
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,3 @@
1-
require File.expand_path('../../../spec_helper', __FILE__)
21
require File.expand_path('../fixtures/classes', __FILE__)
32

43
describe "Struct.new" do

‎spec/rubyspec/language/block_spec.rb

-1
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,3 @@
1-
require File.expand_path('../../spec_helper', __FILE__)
21
require File.expand_path('../fixtures/block', __FILE__)
32

43
describe "A block" do

‎spec/rubyspec/language/numbers_spec.rb

-2
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,3 @@
1-
require File.expand_path('../../spec_helper', __FILE__)
2-
31
describe "Ruby numbers in various ways" do
42

53
it "the standard way" do

‎spec/rubyspec/language/proc_spec.rb

-2
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,3 @@
1-
require File.expand_path('../../spec_helper', __FILE__)
2-
31
describe "A Proc" do
42
it "captures locals from the surrounding scope" do
53
var = 1

‎spec/rubyspec/language/send_spec.rb

-1
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,3 @@
1-
require File.expand_path('../../spec_helper', __FILE__)
21
require File.expand_path('../fixtures/send', __FILE__)
32

43
# Why so many fixed arg tests? JRuby and I assume other Ruby impls have

‎spec/rubyspec/language/variables_spec.rb

-1
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,3 @@
1-
require File.expand_path('../../spec_helper', __FILE__)
21
require File.expand_path('../fixtures/variables', __FILE__)
32

43
# TODO: partition these specs into distinct cases based on the

‎spec/rubyspec/spec_helper.rb

-96
This file was deleted.

0 commit comments

Comments
 (0)
Please sign in to comment.