Skip to content

Commit

Permalink
Disable sprockets related tests
Browse files Browse the repository at this point in the history
  • Loading branch information
elia committed Jul 23, 2016
1 parent b8dc26f commit 30593fe
Show file tree
Hide file tree
Showing 2 changed files with 34 additions and 34 deletions.
4 changes: 2 additions & 2 deletions .travis.yml
Original file line number Diff line number Diff line change
Expand Up @@ -24,8 +24,8 @@ matrix:
- rvm: 2.3.1
env: RUN=mspec_ruby_nodejs TZ="/usr/share/zoneinfo/Pacific/Fiji"

- rvm: 2.3.1
env: RUN=mspec_ruby_sprockets_phantomjs
# - rvm: 2.3.1
# env: RUN=mspec_ruby_sprockets_phantomjs

- rvm: 2.3.1
env: RUN=minitest
Expand Down
64 changes: 32 additions & 32 deletions tasks/testing.rake
Original file line number Diff line number Diff line change
Expand Up @@ -116,38 +116,38 @@ Use PATTERN environment variable to manually set the glob for specs:
DESC

%w[ruby opal].each do |suite|
desc "Run the MSpec/#{suite} test suite on Opal::Sprockets/phantomjs" + pattern_usage
task :"mspec_#{suite}_sprockets_phantomjs" do
filename = File.expand_path('tmp/mspec_sprockets_phantomjs.rb')
runner = "#{__dir__}/testing/sprockets-phantomjs.js"
port = 9999
url = "http://localhost:#{port}/"

mkdir_p File.dirname(filename)
MSpecSuite.write_file filename, MSpecSuite.specs(ENV.to_hash.merge 'SUITE' => suite)

MSpecSuite.stubs.each {|s| ::Opal::Config.stubbed_files << s }

Opal::Config.arity_check_enabled = true
Opal::Config.freezing_stubs_enabled = true
Opal::Config.tainting_stubs_enabled = false
Opal::Config.dynamic_require_severity = :warning

Opal.use_gem 'mspec'
Opal.append_path 'spec'
Opal.append_path 'lib'
Opal.append_path File.dirname(filename)

app = Opal::Server.new { |s| s.main = File.basename(filename) }
server = Thread.new { Rack::Server.start(app: app, Port: port) }
sleep 1

begin
sh 'phantomjs', runner, url
ensure
server.kill if server.alive?
end
end
# desc "Run the MSpec/#{suite} test suite on Opal::Sprockets/phantomjs" + pattern_usage
# task :"mspec_#{suite}_sprockets_phantomjs" do
# filename = File.expand_path('tmp/mspec_sprockets_phantomjs.rb')
# runner = "#{__dir__}/testing/sprockets-phantomjs.js"
# port = 9999
# url = "http://localhost:#{port}/"
#
# mkdir_p File.dirname(filename)
# MSpecSuite.write_file filename, MSpecSuite.specs(ENV.to_hash.merge 'SUITE' => suite)
#
# MSpecSuite.stubs.each {|s| ::Opal::Config.stubbed_files << s }
#
# Opal::Config.arity_check_enabled = true
# Opal::Config.freezing_stubs_enabled = true
# Opal::Config.tainting_stubs_enabled = false
# Opal::Config.dynamic_require_severity = :warning
#
# Opal.use_gem 'mspec'
# Opal.append_path 'spec'
# Opal.append_path 'lib'
# Opal.append_path File.dirname(filename)
#
# app = Opal::Server.new { |s| s.main = File.basename(filename) }
# server = Thread.new { Rack::Server.start(app: app, Port: port) }
# sleep 1
#
# begin
# sh 'phantomjs', runner, url
# ensure
# server.kill if server.alive?
# end
# end

%w[nodejs phantomjs].each do |platform|
desc "Run the MSpec test suite on Opal::Builder/#{platform}" + pattern_usage
Expand Down

0 comments on commit 30593fe

Please sign in to comment.