Make rake jasmine:ci run specs correctly.

- Will replace rake core_specs.
- Remove obsolete dependencies & files -- most of these were for build tasks we
  are no longer using. Notably, rspec and spec_helper were deleted.
This commit is contained in:
Gregg Van Hove and Rajan Agaskar
2013-09-25 10:11:02 -07:00
parent 963cd5e850
commit 5017d1a4f1
58 changed files with 11 additions and 94 deletions

View File

@@ -2,7 +2,7 @@ require 'rubygems'
require 'bundler/setup'
require 'jasmine'
Jasmine.load_configuration_from_yaml(File.join(Dir.pwd, 'spec', 'jasmine.yml'))
Jasmine.load_configuration_from_yaml(File.join(Dir.pwd, 'spec', 'javascripts', 'support', 'jasmine.yml'))
config = Jasmine.config
browser = ENV['JASMINE_BROWSER'] || 'firefox'

View File

@@ -2,7 +2,7 @@ src_dir:
- 'src'
src_files:
- '**/*.js'
boot_dir: 'spec/support'
boot_dir: 'spec/javascripts/support'
boot_files:
- 'dev_boot.js'
helpers:
@@ -10,6 +10,5 @@ helpers:
spec_files:
- 'performance/performance_test.js'
spec_dir:
- 'spec'

View File

@@ -15,7 +15,7 @@ src_files:
- 'html/**.js'
- '**/*.js'
stylesheets:
boot_dir: 'spec/support'
boot_dir: 'spec/javascripts/support'
boot_files:
- 'dev_boot.js'
helpers:
@@ -23,6 +23,5 @@ helpers:
spec_files:
- '**/*[Ss]pec.js'
spec_dir:
- 'spec'

View File

@@ -169,10 +169,10 @@ process.argv.forEach(function(arg) {
specs = [];
if (perfSuite) {
specs = getFiles(__dirname + '/performance', new RegExp("test.js$"));
specs = getFiles(__dirname + '/javascripts/performance', new RegExp("test.js$"));
} else {
var consoleSpecs = getSpecFiles(__dirname + "/console"),
coreSpecs = getSpecFiles(__dirname + "/core"),
var consoleSpecs = getSpecFiles(__dirname + "/javascripts/console"),
coreSpecs = getSpecFiles(__dirname + "/javascripts/core"),
specs = consoleSpecs.concat(coreSpecs);
}

View File

@@ -1,49 +0,0 @@
# This file was generated by the `rspec --init` command. Conventionally, all
# specs live under a `spec` directory, which RSpec adds to the `$LOAD_PATH`.
# Require this file using `require "spec_helper.rb"` to ensure that it is only
# loaded once.
#
# See http://rubydoc.info/gems/rspec-core/RSpec/Core/Configuration
RSpec.configure do |config|
config.treat_symbols_as_metadata_keys_with_true_values = true
config.run_all_when_everything_filtered = true
config.filter_run :focus
end
require 'awesome_print'
require 'tmpdir'
require 'nokogiri'
def project_root
File.join(File.expand_path(File.dirname(__FILE__)), '..')
end
def capture_output(capture = true)
if capture
output = StringIO.new
$stdout = output
end
yield
if capture
output.string
end
ensure
$stdout = STDOUT
end
def reset_dir(dir)
FileUtils.rm_r dir if File.exists?(dir)
FileUtils.mkdir_p dir
end
def jasmine_version
version = jasmine_version_object
version_string = "#{version['major']}.#{version['minor']}.#{version['build']}"
version_string += ".rc#{version['release_candidate']}" if version['release_candidate']
version_string
end
def jasmine_version_object
@version_object ||= JSON.parse(File.read(File.join(JasmineDev.project_root, 'src', 'version.json')))
end