jasmine 1.0.1.1 → 1.0.2.0
Sign up to get free protection for your applications and to get access to all the features.
- data/.gitignore +11 -0
- data/.gitmodules +3 -0
- data/Gemfile +5 -0
- data/HOW_TO_TEST.markdown +11 -0
- data/README.markdown +42 -14
- data/RELEASE.markdown +22 -0
- data/Rakefile +76 -0
- data/generators/jasmine/jasmine_generator.rb +15 -13
- data/generators/jasmine/templates/spec/javascripts/support/jasmine_config.rb +23 -0
- data/install.rb +2 -0
- data/jasmine.gemspec +52 -0
- data/jasmine/Gemfile +6 -0
- data/jasmine/MIT.LICENSE +20 -0
- data/jasmine/README.markdown +28 -0
- data/jasmine/Rakefile +182 -0
- data/jasmine/cruise_config.rb +21 -0
- data/jasmine/example/spec/PlayerSpec.js +58 -0
- data/jasmine/example/spec/SpecHelper.js +9 -0
- data/jasmine/example/src/Player.js +22 -0
- data/jasmine/example/src/Song.js +7 -0
- data/jasmine/images/fail-16.png +0 -0
- data/jasmine/images/fail.png +0 -0
- data/jasmine/images/go-16.png +0 -0
- data/jasmine/images/go.png +0 -0
- data/jasmine/images/pending-16.png +0 -0
- data/jasmine/images/pending.png +0 -0
- data/jasmine/images/question-bk.png +0 -0
- data/jasmine/images/questionbk-16.png +0 -0
- data/jasmine/images/spinner.gif +0 -0
- data/jasmine/jsdoc-template/allclasses.tmpl +17 -0
- data/jasmine/jsdoc-template/allfiles.tmpl +56 -0
- data/jasmine/jsdoc-template/class.tmpl +646 -0
- data/jasmine/jsdoc-template/index.tmpl +39 -0
- data/jasmine/jsdoc-template/publish.js +184 -0
- data/jasmine/jsdoc-template/static/default.css +162 -0
- data/jasmine/jsdoc-template/static/header.html +2 -0
- data/jasmine/jsdoc-template/static/index.html +19 -0
- data/jasmine/jsdoc-template/symbol.tmpl +35 -0
- data/jasmine/spec/runner.html +80 -0
- data/jasmine/spec/suites/BaseSpec.js +27 -0
- data/jasmine/spec/suites/CustomMatchersSpec.js +97 -0
- data/jasmine/spec/suites/EnvSpec.js +158 -0
- data/jasmine/spec/suites/ExceptionsSpec.js +107 -0
- data/jasmine/spec/suites/JsApiReporterSpec.js +103 -0
- data/jasmine/spec/suites/MatchersSpec.js +795 -0
- data/jasmine/spec/suites/MockClockSpec.js +38 -0
- data/jasmine/spec/suites/MultiReporterSpec.js +45 -0
- data/jasmine/spec/suites/NestedResultsSpec.js +54 -0
- data/jasmine/spec/suites/PrettyPrintSpec.js +93 -0
- data/jasmine/spec/suites/QueueSpec.js +23 -0
- data/jasmine/spec/suites/ReporterSpec.js +56 -0
- data/jasmine/spec/suites/RunnerSpec.js +267 -0
- data/jasmine/spec/suites/SpecRunningSpec.js +1253 -0
- data/jasmine/spec/suites/SpecSpec.js +124 -0
- data/jasmine/spec/suites/SpySpec.js +201 -0
- data/jasmine/spec/suites/SuiteSpec.js +120 -0
- data/jasmine/spec/suites/TrivialReporterSpec.js +238 -0
- data/jasmine/spec/suites/UtilSpec.js +40 -0
- data/jasmine/spec/suites/WaitsForBlockSpec.js +87 -0
- data/jasmine/src/Block.js +22 -0
- data/jasmine/src/Env.js +264 -0
- data/jasmine/src/JsApiReporter.js +102 -0
- data/jasmine/src/Matchers.js +354 -0
- data/jasmine/src/MultiReporter.js +35 -0
- data/jasmine/src/NestedResults.js +80 -0
- data/jasmine/src/PrettyPrinter.js +122 -0
- data/jasmine/src/Queue.js +99 -0
- data/jasmine/src/Reporter.js +31 -0
- data/jasmine/src/Runner.js +77 -0
- data/jasmine/src/Spec.js +242 -0
- data/jasmine/src/Suite.js +82 -0
- data/jasmine/src/WaitsBlock.js +13 -0
- data/jasmine/src/WaitsForBlock.js +52 -0
- data/jasmine/src/base.js +589 -0
- data/jasmine/src/html/TrivialReporter.js +188 -0
- data/jasmine/src/html/jasmine.css +166 -0
- data/jasmine/src/mock-timeout.js +183 -0
- data/jasmine/src/util.js +67 -0
- data/jasmine/src/version.json +5 -0
- data/lib/generators/jasmine/examples/USAGE +11 -0
- data/lib/generators/jasmine/examples/examples_generator.rb +19 -0
- data/lib/generators/jasmine/examples/templates/public/javascripts/jasmine_examples/Player.js +22 -0
- data/lib/generators/jasmine/examples/templates/public/javascripts/jasmine_examples/Song.js +7 -0
- data/lib/generators/jasmine/examples/templates/spec/javascripts/helpers/SpecHelper.js +9 -0
- data/lib/generators/jasmine/examples/templates/spec/javascripts/jasmine_examples/PlayerSpec.js +58 -0
- data/lib/generators/jasmine/install/USAGE +11 -0
- data/lib/generators/jasmine/install/install_generator.rb +18 -0
- data/lib/generators/jasmine/install/templates/spec/javascripts/helpers/.gitkeep +0 -0
- data/lib/generators/jasmine/install/templates/spec/javascripts/support/jasmine.yml +81 -0
- data/lib/generators/jasmine/install/templates/spec/javascripts/support/jasmine_config.rb +23 -0
- data/lib/generators/jasmine/install/templates/spec/javascripts/support/jasmine_runner.rb +20 -0
- data/lib/generators/jasmine/jasmine_generator.rb +32 -0
- data/lib/generators/jasmine/templates/INSTALL +9 -0
- data/lib/generators/jasmine/templates/lib/tasks/jasmine.rake +2 -0
- data/lib/generators/jasmine/templates/spec/javascripts/support/jasmine-rails.yml +81 -0
- data/lib/generators/jasmine/templates/spec/javascripts/support/jasmine.yml +73 -0
- data/lib/generators/jasmine/templates/spec/javascripts/support/jasmine_config.rb +23 -0
- data/lib/generators/jasmine/templates/spec/javascripts/support/jasmine_runner.rb +32 -0
- data/lib/jasmine.rb +31 -6
- data/lib/jasmine/command_line_tool.rb +1 -0
- data/lib/jasmine/config.rb +16 -44
- data/lib/jasmine/generator.rb +9 -0
- data/lib/jasmine/selenium_driver.rb +18 -18
- data/lib/jasmine/server.rb +0 -24
- data/lib/jasmine/spec_builder.rb +4 -4
- data/lib/jasmine/tasks/jasmine.rake +2 -2
- data/lib/jasmine/version.rb +3 -0
- data/spec/config_spec.rb +174 -123
- data/spec/fixture/jasmine.erb.yml +4 -0
- data/spec/jasmine_pojs_spec.rb +51 -0
- data/spec/jasmine_rails2_spec.rb +93 -0
- data/spec/jasmine_rails3_spec.rb +71 -0
- data/spec/spec_helper.rb +8 -2
- metadata +215 -65
- data/spec/bug_fixes_spec.rb +0 -32
- data/spec/rails_generator_spec.rb +0 -31
data/spec/bug_fixes_spec.rb
DELETED
@@ -1,32 +0,0 @@
|
|
1
|
-
require File.expand_path(File.join(File.dirname(__FILE__), "spec_helper"))
|
2
|
-
|
3
|
-
describe "Jasmine bug fixes" do
|
4
|
-
before :each do
|
5
|
-
temp_dir_before
|
6
|
-
Dir::chdir @tmp
|
7
|
-
|
8
|
-
@bootstrap = "$:.unshift('#{@root}/lib')"
|
9
|
-
end
|
10
|
-
|
11
|
-
after :each do
|
12
|
-
temp_dir_after
|
13
|
-
end
|
14
|
-
|
15
|
-
module Foo end
|
16
|
-
describe "require 'json_pure'" do
|
17
|
-
it "should not happen until SeleniumDriver is initialized, which is late enough that it won't conflict with Rails" do
|
18
|
-
json_is_defined = `ruby -e "#{@bootstrap}; require 'jasmine'; puts defined?(JSON)"`
|
19
|
-
json_is_defined.chomp.should == "nil"
|
20
|
-
end
|
21
|
-
|
22
|
-
it "should happen when SeleniumDriver is initialized" do
|
23
|
-
json_is_defined = `ruby -e "#{@bootstrap}; require 'jasmine'; Jasmine::SeleniumDriver.new(nil, nil, nil, nil); puts defined?(JSON)"`
|
24
|
-
json_is_defined.chomp.should == "constant"
|
25
|
-
end
|
26
|
-
|
27
|
-
it "should not happen if another json implementation is already loaded" do
|
28
|
-
json_is_defined = `ruby -e "#{@bootstrap}; require 'jasmine'; JSON="123"; Jasmine::SeleniumDriver.new(nil, nil, nil, nil); puts defined?(JSON)"`
|
29
|
-
json_is_defined.chomp.should == "constant"
|
30
|
-
end
|
31
|
-
end
|
32
|
-
end
|
@@ -1,31 +0,0 @@
|
|
1
|
-
require File.expand_path(File.join(File.dirname(__FILE__), "spec_helper"))
|
2
|
-
|
3
|
-
describe "Jasmine rails generator" do
|
4
|
-
before :each do
|
5
|
-
temp_dir_before
|
6
|
-
Dir::chdir @tmp
|
7
|
-
end
|
8
|
-
|
9
|
-
after :each do
|
10
|
-
temp_dir_after
|
11
|
-
end
|
12
|
-
|
13
|
-
it "should create files on init" do
|
14
|
-
if rails3? # todo -- get this working
|
15
|
-
raise Exception.new('rails 3 generators not yet implemented!')
|
16
|
-
else
|
17
|
-
create_rails 'rails-project'
|
18
|
-
Dir::chdir 'rails-project'
|
19
|
-
|
20
|
-
FileUtils.cp_r(File.join(@root, 'generators'), 'vendor')
|
21
|
-
|
22
|
-
output = `./script/generate jasmine`
|
23
|
-
output.should =~ /Jasmine has been installed with example specs./
|
24
|
-
|
25
|
-
bootstrap = "$:.unshift('#{@root}/lib')"
|
26
|
-
ENV['JASMINE_GEM_PATH'] = "#{@root}/lib"
|
27
|
-
ci_output = `rake -E \"#{bootstrap}\" --trace jasmine:ci`
|
28
|
-
ci_output.should =~ (/[1-9][0-9]* examples, 0 failures/)
|
29
|
-
end
|
30
|
-
end
|
31
|
-
end
|