Skip to content

Commit

Permalink
Showing 24 changed files with 30 additions and 125 deletions.
29 changes: 29 additions & 0 deletions spec/ospec/mspec_fixes.rb
Original file line number Diff line number Diff line change
@@ -1,4 +1,5 @@
require 'mspec/mocks/mock'
require 'mspec/guards/guard'

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

proxy
end

# 3. Waiting for: https://github.com/rubyspec/mspec/pull/40
class SpecGuard
def implementation?(*args)
args.any? do |name|
!!case name
when :rubinius
RUBY_NAME =~ /^rbx/
when :ruby
RUBY_NAME =~ /^ruby/
when :jruby
RUBY_NAME =~ /^jruby/
when :ironruby
RUBY_NAME =~ /^ironruby/
when :macruby
RUBY_NAME =~ /^macruby/
when :maglev
RUBY_NAME =~ /^maglev/
when :topaz
RUBY_NAME =~ /^topaz/
when :opal
RUBY_NAME =~ /^opal/
else
false
end
end
end
end

This comment has been minimized.

Copy link
@elia

elia Oct 29, 2013

Member

this code can be removed now: rubyspec/mspec#40 has been merged

1 change: 0 additions & 1 deletion spec/rubyspec/core/module/const_defined_spec.rb
Original file line number Diff line number Diff line change
@@ -1,4 +1,3 @@
require File.expand_path('../../../spec_helper', __FILE__)
require File.expand_path('../../../fixtures/constants', __FILE__)

CD_CONST1 = :const1
1 change: 0 additions & 1 deletion spec/rubyspec/core/module/const_get_spec.rb
Original file line number Diff line number Diff line change
@@ -1,4 +1,3 @@
require File.expand_path('../../../spec_helper', __FILE__)
require File.expand_path('../../../fixtures/constants', __FILE__)

CS_CONST1 = :const1
1 change: 0 additions & 1 deletion spec/rubyspec/core/module/const_missing_spec.rb
Original file line number Diff line number Diff line change
@@ -1,4 +1,3 @@
require File.expand_path('../../../spec_helper', __FILE__)
require File.expand_path('../../../fixtures/constants', __FILE__)

describe "Module#const_missing" do
1 change: 0 additions & 1 deletion spec/rubyspec/core/module/const_set_spec.rb
Original file line number Diff line number Diff line change
@@ -1,4 +1,3 @@
require File.expand_path('../../../spec_helper', __FILE__)
require File.expand_path('../../../fixtures/constants', __FILE__)

module ConstantSpecs
1 change: 0 additions & 1 deletion spec/rubyspec/core/module/method_defined_spec.rb
Original file line number Diff line number Diff line change
@@ -1,4 +1,3 @@
require File.expand_path('../../../spec_helper', __FILE__)
require File.expand_path('../fixtures/classes', __FILE__)

describe "Module#method_defined?" do
1 change: 0 additions & 1 deletion spec/rubyspec/core/module/public_method_defined_spec.rb
Original file line number Diff line number Diff line change
@@ -1,4 +1,3 @@
require File.expand_path('../../../spec_helper', __FILE__)
require File.expand_path('../fixtures/classes', __FILE__)

describe "Module#public_method_defined?" do
1 change: 0 additions & 1 deletion spec/rubyspec/core/module/remove_const_spec.rb
Original file line number Diff line number Diff line change
@@ -1,4 +1,3 @@
require File.expand_path('../../../spec_helper', __FILE__)
require File.expand_path('../../../fixtures/constants', __FILE__)

describe "Module#remove_const" do
1 change: 0 additions & 1 deletion spec/rubyspec/core/module/undef_method_spec.rb
Original file line number Diff line number Diff line change
@@ -1,4 +1,3 @@
require File.expand_path('../../../spec_helper', __FILE__)
require File.expand_path('../fixtures/classes', __FILE__)

module ModuleSpecs
3 changes: 0 additions & 3 deletions spec/rubyspec/core/numeric/step_spec.rb
Original file line number Diff line number Diff line change
@@ -1,6 +1,3 @@
require File.expand_path('../../../spec_helper', __FILE__)
#require File.expand_path('../fixtures/classes', __FILE__)

describe "Numeric#step" do
before :each do
ScratchPad.record []
3 changes: 0 additions & 3 deletions spec/rubyspec/core/string/center_spec.rb
Original file line number Diff line number Diff line change
@@ -1,7 +1,4 @@
# -*- encoding: utf-8 -*-
require File.expand_path('../../../spec_helper', __FILE__)
require File.expand_path('../fixtures/classes.rb', __FILE__)

describe "String#center with length, padding" do
it "returns a new string of specified length with self centered and padded with padstr" do
"one".center(9, '.').should == "...one..."
1 change: 0 additions & 1 deletion spec/rubyspec/core/string/element_reference_spec.rb
Original file line number Diff line number Diff line change
@@ -1,4 +1,3 @@
require File.expand_path('../../../spec_helper', __FILE__)
require File.expand_path('../fixtures/classes', __FILE__)

describe "String#[]" do
1 change: 0 additions & 1 deletion spec/rubyspec/core/string/index_spec.rb
Original file line number Diff line number Diff line change
@@ -1,5 +1,4 @@
# -*- encoding: utf-8 -*-
require File.expand_path('../../../spec_helper', __FILE__)
require File.expand_path('../fixtures/classes.rb', __FILE__)

describe "String#index" do
1 change: 0 additions & 1 deletion spec/rubyspec/core/string/ljust_spec.rb
Original file line number Diff line number Diff line change
@@ -1,5 +1,4 @@
# -*- encoding: utf-8 -*-
require File.expand_path('../../../spec_helper', __FILE__)
require File.expand_path('../fixtures/classes.rb', __FILE__)

describe "String#ljust" do
1 change: 0 additions & 1 deletion spec/rubyspec/core/string/rjust_spec.rb
Original file line number Diff line number Diff line change
@@ -1,5 +1,4 @@
# -*- encoding: utf-8 -*-
require File.expand_path('../../../spec_helper', __FILE__)
require File.expand_path('../fixtures/classes.rb', __FILE__)

describe "String#rjust with length, padding" do
3 changes: 1 addition & 2 deletions spec/rubyspec/core/string/slice_spec.rb
Original file line number Diff line number Diff line change
@@ -1,4 +1,3 @@
require File.expand_path('../../../spec_helper', __FILE__)
require File.expand_path('../fixtures/classes', __FILE__)

describe "String#slice" do
@@ -72,4 +71,4 @@
"x".slice(-2, 0).should == nil
"x".slice(-2, 1).should == nil
end
end
end
1 change: 0 additions & 1 deletion spec/rubyspec/core/struct/initialize_spec.rb
Original file line number Diff line number Diff line change
@@ -1,4 +1,3 @@
require File.expand_path('../../../spec_helper', __FILE__)
require File.expand_path('../fixtures/classes', __FILE__)

describe "Struct#initialize" do
1 change: 0 additions & 1 deletion spec/rubyspec/core/struct/new_spec.rb
Original file line number Diff line number Diff line change
@@ -1,4 +1,3 @@
require File.expand_path('../../../spec_helper', __FILE__)
require File.expand_path('../fixtures/classes', __FILE__)

describe "Struct.new" do
1 change: 0 additions & 1 deletion spec/rubyspec/language/block_spec.rb
Original file line number Diff line number Diff line change
@@ -1,4 +1,3 @@
require File.expand_path('../../spec_helper', __FILE__)
require File.expand_path('../fixtures/block', __FILE__)

describe "A block" do
2 changes: 0 additions & 2 deletions spec/rubyspec/language/numbers_spec.rb
Original file line number Diff line number Diff line change
@@ -1,5 +1,3 @@
require File.expand_path('../../spec_helper', __FILE__)

describe "Ruby numbers in various ways" do

it "the standard way" do
2 changes: 0 additions & 2 deletions spec/rubyspec/language/proc_spec.rb
Original file line number Diff line number Diff line change
@@ -1,5 +1,3 @@
require File.expand_path('../../spec_helper', __FILE__)

describe "A Proc" do
it "captures locals from the surrounding scope" do
var = 1
1 change: 0 additions & 1 deletion spec/rubyspec/language/send_spec.rb
Original file line number Diff line number Diff line change
@@ -1,4 +1,3 @@
require File.expand_path('../../spec_helper', __FILE__)
require File.expand_path('../fixtures/send', __FILE__)

# Why so many fixed arg tests? JRuby and I assume other Ruby impls have
1 change: 0 additions & 1 deletion spec/rubyspec/language/variables_spec.rb
Original file line number Diff line number Diff line change
@@ -1,4 +1,3 @@
require File.expand_path('../../spec_helper', __FILE__)
require File.expand_path('../fixtures/variables', __FILE__)

# TODO: partition these specs into distinct cases based on the
96 changes: 0 additions & 96 deletions spec/rubyspec/spec_helper.rb

This file was deleted.

0 comments on commit 1c33709

Please sign in to comment.