Skip to content

Commit

Permalink
Remove all stubbed mspec files
Browse files Browse the repository at this point in the history
  • Loading branch information
adambeynon committed Oct 29, 2013
1 parent f11d804 commit 055b851
Show file tree
Hide file tree
Showing 8 changed files with 16 additions and 2 deletions.
Empty file removed spec/mspec/guards/block_device.rb
Empty file.
Empty file removed spec/mspec/guards/endian.rb
Empty file.
Empty file removed spec/mspec/helpers/environment.rb
Empty file.
Empty file.
Empty file removed spec/mspec/helpers/tmp.rb
Empty file.
File renamed without changes.
2 changes: 1 addition & 1 deletion spec/spec_helper.rb
Expand Up @@ -3,7 +3,7 @@
require 'set'
require 'opal-parser'
require 'mspec'
require 'mspec/mock_install_method_patch'
require 'ospec/mock_install_method_patch'

ENV['MSPEC_RUNNER'] = true

Expand Down
16 changes: 15 additions & 1 deletion tasks/mspec.rake
Expand Up @@ -28,11 +28,24 @@ class SpecEnvironment < Opal::Environment
append_path 'rubyspec'
use_gem 'mspec'

%w[fileutils iconv yaml].each do |asset|
stubs.each do |asset|
Opal::Processor.stub_file asset
end
end

def stubs
# missing stdlib
stubs = %w[fileutils iconv yaml]

# use x-strings which generate bad javascript
stubs << "mspec/helpers/tmp"
stubs << "mspec/helpers/environment"
stubs << "mspec/guards/block_device"
stubs << "mspec/guards/endian"

stubs
end

def specs
@specs ||= self['ospec/main'].to_s
end
Expand All @@ -51,6 +64,7 @@ end
class RunSpec
def initialize(file=nil)
Opal::Processor.arity_check_enabled = true
Opal::Processor.dynamic_require_severity = :warning

ENV['OPAL_SPEC'] = self.specs_to_run(file).join(',')

Expand Down

0 comments on commit 055b851

Please sign in to comment.