Compare commits

...

5 Commits

Author SHA1 Message Date
Davis W. Frank & Rajan Agaskar
fd91433792 Version 1.3.1 2012-12-03 09:51:08 -08:00
Davis W. Frank & Rajan Agaskar
1f9004eaa3 Re-add pages submodule for release build script
- Use public github url
2012-12-03 09:47:48 -08:00
dev
58e6747930 Fixing test runner failures in IE 6/7/8 whereby HtmlReporter.js bails out as we're using for (reserved keyword) as object property name. Fix is just to quote the name which allows IE6/7/8 to run the tests. I think this might also fix Issue #303 on main repo (https://github.com/pivotal/jasmine/issues/303) 2012-12-03 09:38:57 -08:00
Davis W. Frank & Rajan Agaskar
4c083856be Setup Travis build 2012-12-03 09:38:54 -08:00
Davis W. Frank & Rajan Agaskar
b94522193c Use jasmine-gem for jasmine-core tests 2012-11-28 14:25:39 -08:00
15 changed files with 128 additions and 13 deletions

2
.gitmodules vendored
View File

@@ -1,3 +1,3 @@
[submodule "pages"]
path = pages
url = git@github.com:pivotal/jasmine.git
url = https://github.com/pivotal/jasmine.git

1
.rspec
View File

@@ -1,2 +1 @@
--color
--format Fuubar

9
.travis.yml Normal file
View File

@@ -0,0 +1,9 @@
# before_script:
# - "sh -e /etc/init.d/xvfb start"
before_install:
- "export DISPLAY=:99.0"
- "sh -e /etc/init.d/xvfb start"#
script: "DISPLAY=:99.0 bundle exec rake jasmine_core_spec"
rvm:
- "1.9.3"

View File

@@ -1,3 +1,11 @@
source :rubygems
gem "rake"
gem "jasmine", git: 'https://github.com/pivotal/jasmine-gem.git'
unless ENV["TRAVIS"]
group :debug do
gem 'debugger'
end
end
gemspec

View File

@@ -1,4 +1,5 @@
<a name="README">[Jasmine](http://pivotal.github.com/jasmine/)</a>
<a name="README">[Jasmine](http://pivotal.github.com/jasmine/)</a> <a title="Build at Travis CI" href="http://travis-ci.org/#!/pivotal/jasmine"><img src="https://secure.travis-ci.org/pivotal/jasmine.png" /></a>
=======
**A JavaScript Testing Framework**

View File

@@ -41,4 +41,40 @@ desc "View full development tasks"
task :list_dev_tasks do
puts "Jasmine uses Thor for command line tasks for development. Here is the command set:"
system "thor list"
end
end
require "jasmine"
require 'rspec'
require 'rspec/core/rake_task'
desc "Run all examples"
RSpec::Core::RakeTask.new(:jasmine_core_spec) do |t|
t.pattern = 'spec/jasmine_self_test_spec.rb'
end
namespace :jasmine do
task :server do
port = ENV['JASMINE_PORT'] || 8888
Jasmine.load_configuration_from_yaml(File.join(Dir.pwd, 'spec', 'jasmine.yml'))
config = Jasmine.config
server = Jasmine::Server.new(8888, Jasmine::Application.app(config))
server.start
puts "your tests are here:"
puts " http://localhost:#{port}/"
end
desc "Copy examples from Jasmine JS to the gem"
task :copy_examples_to_gem do
require "fileutils"
# copy jasmine's example tree into our generator templates dir
FileUtils.rm_r('generators/jasmine/templates/jasmine-example', :force => true)
FileUtils.cp_r(File.join(Jasmine::Core.path, 'example'), 'generators/jasmine/templates/jasmine-example', :preserve => true)
end
end
desc "Run specs via server"
task :jasmine => ['jasmine:server']

View File

@@ -154,7 +154,7 @@ jasmine.HtmlReporter = function(_doc) {
dom.symbolSummary = self.createDom('ul', {className: 'symbolSummary'}),
dom.alert = self.createDom('div', {className: 'alert'},
self.createDom('span', { className: 'exceptions' },
self.createDom('label', { className: 'label', for: 'no_try_catch' }, 'No try/catch'),
self.createDom('label', { className: 'label', 'for': 'no_try_catch' }, 'No try/catch'),
self.createDom('input', { id: 'no_try_catch', type: 'checkbox' }))),
dom.results = self.createDom('div', {className: 'results'},
dom.summary = self.createDom('div', { className: 'summary' }),

View File

@@ -2595,6 +2595,6 @@ jasmine.WaitsForBlock.prototype.execute = function(onComplete) {
jasmine.version_= {
"major": 1,
"minor": 3,
"build": 0,
"revision": 1354052693
"build": 1,
"revision": 1354556913
};

View File

@@ -1,6 +1,6 @@
module Jasmine
module Core
VERSION = "1.3.0"
VERSION = "1.3.1"
end
end

2
pages

Submodule pages updated: 00ba05c213...dae7b20e1c

39
spec/jasmine.yml Normal file
View File

@@ -0,0 +1,39 @@
jasmine_dir:
- 'src'
#This 'magic' inclusion order allows the travis build to pass.
#TODO: search for the correct files to include to prevent
jasmine_files:
- 'core/base.js'
- 'core/util.js'
- 'core/Reporter.js'
#end of known dependencies
- 'core/Env.js'
- 'core/Block.js'
- 'core/JsApiReporter.js'
- 'core/Matchers.js'
- 'core/mock-timeout.js'
- 'core/MultiReporter.js'
- 'core/NestedResults.js'
- 'core/PrettyPrinter.js'
- 'core/Queue.js'
- 'core/Runner.js'
- 'core/Spec.js'
- 'core/Suite.js'
- 'core/WaitsBlock.js'
- 'core/WaitsForBlock.js'
- 'html/HtmlReporterHelpers.js'
- 'html/HtmlReporter.js'
- '**/*.js'
jasmine_css_files:
- 'html/jasmine.css'
src_files:
stylesheets:
helpers:
- 'helpers/**/*.js'
spec_files:
- '**/*[Ss]pec.js'
src_dir:
spec_dir:
- 'spec'

View File

@@ -0,0 +1,23 @@
require 'jasmine'
Jasmine.load_configuration_from_yaml(File.join(Dir.pwd, 'spec', 'jasmine.yml'))
config = Jasmine.config
server = Jasmine::Server.new(config.port, Jasmine::Application.app(config))
driver = Jasmine::SeleniumDriver.new(config.browser, "#{config.host}:#{config.port}/")
t = Thread.new do
begin
server.start
rescue ChildProcess::TimeoutError
end
# # ignore bad exits
end
t.abort_on_exception = true
Jasmine::wait_for_listener(config.port, "jasmine server")
puts "jasmine server started."
results_processor = Jasmine::ResultsProcessor.new(config)
results = Jasmine::Runners::HTTP.new(driver, results_processor, config.result_batch_size).run
formatter = Jasmine::RspecFormatter.new
formatter.format_results(results)

View File

@@ -94,7 +94,7 @@ jasmine.HtmlReporter = function(_doc) {
dom.symbolSummary = self.createDom('ul', {className: 'symbolSummary'}),
dom.alert = self.createDom('div', {className: 'alert'},
self.createDom('span', { className: 'exceptions' },
self.createDom('label', { className: 'label', for: 'no_try_catch' }, 'No try/catch'),
self.createDom('label', { className: 'label', 'for': 'no_try_catch' }, 'No try/catch'),
self.createDom('input', { id: 'no_try_catch', type: 'checkbox' }))),
dom.results = self.createDom('div', {className: 'results'},
dom.summary = self.createDom('div', { className: 'summary' }),

View File

@@ -2,6 +2,6 @@
jasmine.version_= {
"major": 1,
"minor": 3,
"build": 0,
"revision": 1354052693
"build": 1,
"revision": 1354556913
};

View File

@@ -1,5 +1,5 @@
{
"major": 1,
"minor": 3,
"build": 0
"build": 1
}