Sha256: 43643d66aa303fb28d8b5ee748358608159bd210f9320a1713234e0c935d363c

Contents?: true

Size: 813 Bytes

Versions: 3

Compression:

Stored size: 813 Bytes

Contents

# puts "running spec!"

# To run specs, do the following in order:
# 
# 1. require() spec opal
# 2. Setup rspec
# 3. require spec/spec_helper.rb from current working dir (i.e. main target)
# 4. Dir.glob over spec/**/*.rb in working dir to get all specs
# 5. Run specs.

# 1
require 'spec'

# 2
# nothing to do?

# 3

# 4
Dir.glob(File.join(Dir.getwd, 'spec/**/*.rb')).each do |rb|
  require rb
end


# if we run in the browser, we really want to wait until the document is ready
# before we start running..
if RUBY_PLATFORM == "browser"
  Document.ready? do
    # puts "running in ready"
    Spec::Runner.run
  end
else
  Spec::Runner.run
end

# require "spec"
# 
# Dir.glob(File.join(Dir.getwd, 'opals', 'opal', 'spec/**/*.rb')).each do |rb|
#   puts "requiring #{rb}"
#   require rb
# end
# 
# Spec::Runner.run

Version data entries

3 entries across 3 versions & 1 rubygems

Version Path
opal-0.2.2 opals/opal/spec/bin/spec.rb
opal-0.2.0 opals/opal/spec/bin/spec.rb
opal-0.1.0 opals/spec/bin/spec.rb