upjs-rails 0.11.0 → 0.11.1
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/CHANGELOG.md +10 -1
- data/dist/up.js +138 -81
- data/dist/up.min.js +2 -2
- data/lib/assets/javascripts/up/boot.js.coffee +3 -0
- data/lib/assets/javascripts/up/browser.js.coffee +42 -26
- data/lib/assets/javascripts/up/flow.js.coffee +6 -4
- data/lib/assets/javascripts/up/history.js.coffee +1 -1
- data/lib/assets/javascripts/up/modal.js.coffee +4 -4
- data/lib/assets/javascripts/up/motion.js.coffee +6 -4
- data/lib/assets/javascripts/up/proxy.js.coffee +2 -1
- data/lib/assets/javascripts/up/util.js.coffee +61 -32
- data/lib/assets/javascripts/up.js.coffee +1 -10
- data/lib/upjs/rails/version.rb +1 -1
- data/spec_app/config/environments/development.rb +1 -1
- data/spec_app/spec/javascripts/helpers/reset_path.js.coffee +3 -2
- data/spec_app/spec/javascripts/up/flow_spec.js.coffee +1 -1
- data/spec_app/spec/javascripts/up/history_spec.js.coffee +53 -47
- data/spec_app/spec/javascripts/up/link_spec.js.coffee +1 -1
- data/spec_app/spec/javascripts/up/motion_spec.js.coffee +4 -4
- data/spec_app/spec/javascripts/up/proxy_spec.js.coffee +18 -9
- data/spec_app/vendor/assets/bower_components/jasmine/.bower.json +43 -7
- data/spec_app/vendor/assets/bower_components/jasmine/CONTRIBUTING.md +26 -17
- data/spec_app/vendor/assets/bower_components/jasmine/README.md +27 -18
- data/spec_app/vendor/assets/bower_components/jasmine/RELEASE.md +15 -5
- data/spec_app/vendor/assets/bower_components/jasmine/bower.json +41 -0
- data/spec_app/vendor/assets/bower_components/jasmine/lib/console/console.js +27 -3
- data/spec_app/vendor/assets/bower_components/jasmine/lib/jasmine-core/boot.js +10 -9
- data/spec_app/vendor/assets/bower_components/jasmine/lib/jasmine-core/example/node_example/{src → lib/jasmine_examples}/Player.js +0 -0
- data/spec_app/vendor/assets/bower_components/jasmine/lib/jasmine-core/example/node_example/{src → lib/jasmine_examples}/Song.js +0 -0
- data/spec_app/vendor/assets/bower_components/jasmine/lib/jasmine-core/jasmine-html.js +76 -20
- data/spec_app/vendor/assets/bower_components/jasmine/lib/jasmine-core/jasmine.css +15 -18
- data/spec_app/vendor/assets/bower_components/jasmine/lib/jasmine-core/jasmine.js +1399 -694
- data/spec_app/vendor/assets/bower_components/jasmine/lib/jasmine-core/json2.js +73 -62
- data/spec_app/vendor/assets/bower_components/jasmine/lib/jasmine-core/node_boot.js +1 -1
- data/spec_app/vendor/assets/bower_components/jasmine/lib/jasmine-core.js +29 -31
- data/spec_app/vendor/assets/bower_components/jasmine/package.json +18 -7
- data/spec_app/vendor/assets/bower_components/jasmine-ajax/.bower.json +11 -13
- data/spec_app/vendor/assets/bower_components/jasmine-ajax/MIT.LICENSE +1 -1
- data/spec_app/vendor/assets/bower_components/jasmine-ajax/README.markdown +198 -125
- data/spec_app/vendor/assets/bower_components/jasmine-ajax/bower.json +9 -10
- data/spec_app/vendor/assets/bower_components/jasmine-ajax/lib/mock-ajax.js +250 -59
- data/spec_app/vendor/assets/bower_components/jasmine-ajax/package.json +9 -4
- data/spec_app/vendor/assets/bower_components/jasmine-ajax/release_notes/2.0.2.md +50 -0
- data/spec_app/vendor/assets/bower_components/jasmine-ajax/release_notes/2.99.md +14 -0
- data/spec_app/vendor/assets/bower_components/jasmine-ajax/release_notes/3.0.md +28 -0
- data/spec_app/vendor/assets/bower_components/jasmine-ajax/release_notes/3.1.0.md +24 -0
- data/spec_app/vendor/assets/bower_components/jasmine-ajax/release_notes/3.1.1.md +23 -0
- data/spec_app/vendor/assets/bower_components/jasmine-ajax/release_notes/3.2.0.md +20 -0
- data/spec_app/vendor/assets/bower_components/jasmine-fixture/.bower.json +4 -4
- data/spec_app/vendor/assets/bower_components/jasmine-fixture/bower.json +1 -1
- data/spec_app/vendor/assets/bower_components/jasmine-fixture/dist/jasmine-fixture.js +4 -4
- data/spec_app/vendor/assets/bower_components/jasmine-fixture/dist/jasmine-fixture.min.js +2 -2
- data/spec_app/vendor/assets/bower_components/jasmine-jquery/.bower.json +4 -4
- data/spec_app/vendor/assets/bower_components/jasmine-jquery/Gruntfile.js +17 -1
- data/spec_app/vendor/assets/bower_components/jasmine-jquery/{MIT.LICENSE → LICENSE} +0 -0
- data/spec_app/vendor/assets/bower_components/jasmine-jquery/README.md +14 -9
- data/spec_app/vendor/assets/bower_components/jasmine-jquery/bower.json +0 -1
- data/spec_app/vendor/assets/bower_components/jasmine-jquery/lib/jasmine-jquery.js +35 -10
- data/spec_app/vendor/assets/bower_components/jasmine-jquery/package.json +33 -24
- data/spec_app/vendor/assets/bower_components/jasmine-jquery/spec/fixtures/fixture_with_checkbox_with_checked.html +6 -0
- data/spec_app/vendor/assets/bower_components/jasmine-jquery/spec/suites/jasmine-jquery-spec.js +61 -1
- data/spec_app/vendor/assets/bower_components/jquery/.bower.json +5 -4
- data/spec_app/vendor/assets/bower_components/jquery/bower.json +2 -1
- data/spec_app/vendor/assets/bower_components/jquery/dist/jquery.js +9 -4
- data/spec_app/vendor/assets/bower_components/jquery/dist/jquery.min.js +4 -4
- data/spec_app/vendor/assets/bower_components/jquery/dist/jquery.min.map +1 -1
- data/spec_app/vendor/assets/bower_components/jquery/src/core.js +6 -1
- metadata +14 -175
- data/spec_app/vendor/assets/bower_components/jasmine/.gitignore +0 -24
- data/spec_app/vendor/assets/bower_components/jasmine/.gitmodules +0 -3
- data/spec_app/vendor/assets/bower_components/jasmine/.jshintrc +0 -9
- data/spec_app/vendor/assets/bower_components/jasmine/.npmignore +0 -21
- data/spec_app/vendor/assets/bower_components/jasmine/.rspec +0 -1
- data/spec_app/vendor/assets/bower_components/jasmine/.travis.yml +0 -51
- data/spec_app/vendor/assets/bower_components/jasmine/Gemfile +0 -12
- data/spec_app/vendor/assets/bower_components/jasmine/Gruntfile.js +0 -53
- data/spec_app/vendor/assets/bower_components/jasmine/Rakefile +0 -18
- data/spec_app/vendor/assets/bower_components/jasmine/dist/jasmine-standalone-1.0.0.zip +0 -0
- data/spec_app/vendor/assets/bower_components/jasmine/dist/jasmine-standalone-1.1.0.zip +0 -0
- data/spec_app/vendor/assets/bower_components/jasmine/dist/jasmine-standalone-1.2.0.zip +0 -0
- data/spec_app/vendor/assets/bower_components/jasmine/dist/jasmine-standalone-1.3.0.zip +0 -0
- data/spec_app/vendor/assets/bower_components/jasmine/dist/jasmine-standalone-1.3.1.zip +0 -0
- data/spec_app/vendor/assets/bower_components/jasmine/dist/jasmine-standalone-2.0.0.zip +0 -0
- data/spec_app/vendor/assets/bower_components/jasmine/dist/jasmine-standalone-2.0.1.zip +0 -0
- data/spec_app/vendor/assets/bower_components/jasmine/dist/jasmine-standalone-2.0.2.zip +0 -0
- data/spec_app/vendor/assets/bower_components/jasmine/dist/jasmine-standalone-2.0.3.zip +0 -0
- data/spec_app/vendor/assets/bower_components/jasmine/grunt/config/compass.js +0 -10
- data/spec_app/vendor/assets/bower_components/jasmine/grunt/config/compress.js +0 -66
- data/spec_app/vendor/assets/bower_components/jasmine/grunt/config/concat.js +0 -61
- data/spec_app/vendor/assets/bower_components/jasmine/grunt/config/jshint.js +0 -11
- data/spec_app/vendor/assets/bower_components/jasmine/grunt/tasks/build_standalone.js +0 -31
- data/spec_app/vendor/assets/bower_components/jasmine/grunt/tasks/version.js +0 -14
- data/spec_app/vendor/assets/bower_components/jasmine/grunt/templates/SpecRunner.html.jst +0 -26
- data/spec_app/vendor/assets/bower_components/jasmine/grunt/templates/licenseBanner.js.jst +0 -22
- data/spec_app/vendor/assets/bower_components/jasmine/grunt/templates/version.rb.jst +0 -9
- data/spec_app/vendor/assets/bower_components/jasmine/images/__init__.py +0 -0
- data/spec_app/vendor/assets/bower_components/jasmine/jasmine-core.gemspec +0 -23
- data/spec_app/vendor/assets/bower_components/jasmine/lib/jasmine-core/__init__.py +0 -1
- data/spec_app/vendor/assets/bower_components/jasmine/lib/jasmine-core/boot/boot.js +0 -120
- data/spec_app/vendor/assets/bower_components/jasmine/lib/jasmine-core/boot/node_boot.js +0 -19
- data/spec_app/vendor/assets/bower_components/jasmine/lib/jasmine-core/core.py +0 -60
- data/spec_app/vendor/assets/bower_components/jasmine/lib/jasmine-core/example/node_example/spec/PlayerSpec.js +0 -60
- data/spec_app/vendor/assets/bower_components/jasmine/lib/jasmine-core/example/node_example/spec/SpecHelper.js +0 -15
- data/spec_app/vendor/assets/bower_components/jasmine/lib/jasmine-core/example/spec/PlayerSpec.js +0 -58
- data/spec_app/vendor/assets/bower_components/jasmine/lib/jasmine-core/example/spec/SpecHelper.js +0 -15
- data/spec_app/vendor/assets/bower_components/jasmine/lib/jasmine-core/example/src/Player.js +0 -22
- data/spec_app/vendor/assets/bower_components/jasmine/lib/jasmine-core/example/src/Song.js +0 -7
- data/spec_app/vendor/assets/bower_components/jasmine/lib/jasmine-core/version.rb +0 -9
- data/spec_app/vendor/assets/bower_components/jasmine/lib/jasmine-core.rb +0 -53
- data/spec_app/vendor/assets/bower_components/jasmine/release_notes/2.0.1.md +0 -70
- data/spec_app/vendor/assets/bower_components/jasmine/release_notes/2.0.2.md +0 -25
- data/spec_app/vendor/assets/bower_components/jasmine/release_notes/20.md +0 -179
- data/spec_app/vendor/assets/bower_components/jasmine/setup.py +0 -47
- data/spec_app/vendor/assets/bower_components/jasmine/spec/console/ConsoleReporterSpec.js +0 -239
- data/spec_app/vendor/assets/bower_components/jasmine/spec/core/AnySpec.js +0 -46
- data/spec_app/vendor/assets/bower_components/jasmine/spec/core/CallTrackerSpec.js +0 -105
- data/spec_app/vendor/assets/bower_components/jasmine/spec/core/ClockSpec.js +0 -445
- data/spec_app/vendor/assets/bower_components/jasmine/spec/core/DelayedFunctionSchedulerSpec.js +0 -246
- data/spec_app/vendor/assets/bower_components/jasmine/spec/core/EnvSpec.js +0 -85
- data/spec_app/vendor/assets/bower_components/jasmine/spec/core/ExceptionFormatterSpec.js +0 -63
- data/spec_app/vendor/assets/bower_components/jasmine/spec/core/ExceptionsSpec.js +0 -68
- data/spec_app/vendor/assets/bower_components/jasmine/spec/core/ExpectationResultSpec.js +0 -61
- data/spec_app/vendor/assets/bower_components/jasmine/spec/core/ExpectationSpec.js +0 -427
- data/spec_app/vendor/assets/bower_components/jasmine/spec/core/JsApiReporterSpec.js +0 -214
- data/spec_app/vendor/assets/bower_components/jasmine/spec/core/MockDateSpec.js +0 -199
- data/spec_app/vendor/assets/bower_components/jasmine/spec/core/ObjectContainingSpec.js +0 -70
- data/spec_app/vendor/assets/bower_components/jasmine/spec/core/PrettyPrintSpec.js +0 -156
- data/spec_app/vendor/assets/bower_components/jasmine/spec/core/QueueRunnerSpec.js +0 -271
- data/spec_app/vendor/assets/bower_components/jasmine/spec/core/ReportDispatcherSpec.js +0 -40
- data/spec_app/vendor/assets/bower_components/jasmine/spec/core/SpecSpec.js +0 -260
- data/spec_app/vendor/assets/bower_components/jasmine/spec/core/SpySpec.js +0 -67
- data/spec_app/vendor/assets/bower_components/jasmine/spec/core/SpyStrategySpec.js +0 -111
- data/spec_app/vendor/assets/bower_components/jasmine/spec/core/SuiteSpec.js +0 -216
- data/spec_app/vendor/assets/bower_components/jasmine/spec/core/TimerSpec.js +0 -31
- data/spec_app/vendor/assets/bower_components/jasmine/spec/core/UtilSpec.js +0 -28
- data/spec_app/vendor/assets/bower_components/jasmine/spec/core/integration/CustomMatchersSpec.js +0 -149
- data/spec_app/vendor/assets/bower_components/jasmine/spec/core/integration/EnvSpec.js +0 -506
- data/spec_app/vendor/assets/bower_components/jasmine/spec/core/integration/SpecRunningSpec.js +0 -306
- data/spec_app/vendor/assets/bower_components/jasmine/spec/core/matchers/matchersUtilSpec.js +0 -239
- data/spec_app/vendor/assets/bower_components/jasmine/spec/core/matchers/toBeCloseToSpec.js +0 -51
- data/spec_app/vendor/assets/bower_components/jasmine/spec/core/matchers/toBeDefinedSpec.js +0 -18
- data/spec_app/vendor/assets/bower_components/jasmine/spec/core/matchers/toBeFalsySpec.js +0 -38
- data/spec_app/vendor/assets/bower_components/jasmine/spec/core/matchers/toBeGreaterThanSpec.js +0 -20
- data/spec_app/vendor/assets/bower_components/jasmine/spec/core/matchers/toBeLessThanSpec.js +0 -20
- data/spec_app/vendor/assets/bower_components/jasmine/spec/core/matchers/toBeNaNSpec.js +0 -37
- data/spec_app/vendor/assets/bower_components/jasmine/spec/core/matchers/toBeNullSpec.js +0 -17
- data/spec_app/vendor/assets/bower_components/jasmine/spec/core/matchers/toBeSpec.js +0 -17
- data/spec_app/vendor/assets/bower_components/jasmine/spec/core/matchers/toBeTruthySpec.js +0 -38
- data/spec_app/vendor/assets/bower_components/jasmine/spec/core/matchers/toBeUndefinedSpec.js +0 -18
- data/spec_app/vendor/assets/bower_components/jasmine/spec/core/matchers/toContainSpec.js +0 -26
- data/spec_app/vendor/assets/bower_components/jasmine/spec/core/matchers/toEqualSpec.js +0 -28
- data/spec_app/vendor/assets/bower_components/jasmine/spec/core/matchers/toHaveBeenCalledSpec.js +0 -47
- data/spec_app/vendor/assets/bower_components/jasmine/spec/core/matchers/toHaveBeenCalledWithSpec.js +0 -66
- data/spec_app/vendor/assets/bower_components/jasmine/spec/core/matchers/toMatchSpec.js +0 -34
- data/spec_app/vendor/assets/bower_components/jasmine/spec/core/matchers/toThrowErrorSpec.js +0 -280
- data/spec_app/vendor/assets/bower_components/jasmine/spec/core/matchers/toThrowSpec.js +0 -99
- data/spec_app/vendor/assets/bower_components/jasmine/spec/helpers/BrowserFlags.js +0 -23
- data/spec_app/vendor/assets/bower_components/jasmine/spec/helpers/defineJasmineUnderTest.js +0 -7
- data/spec_app/vendor/assets/bower_components/jasmine/spec/helpers/nodeDefineJasmineUnderTest.js +0 -33
- data/spec_app/vendor/assets/bower_components/jasmine/spec/html/HtmlReporterSpec.js +0 -616
- data/spec_app/vendor/assets/bower_components/jasmine/spec/html/HtmlSpecFilterSpec.js +0 -18
- data/spec_app/vendor/assets/bower_components/jasmine/spec/html/MatchersHtmlSpec.js +0 -37
- data/spec_app/vendor/assets/bower_components/jasmine/spec/html/PrettyPrintHtmlSpec.js +0 -15
- data/spec_app/vendor/assets/bower_components/jasmine/spec/html/QueryStringSpec.js +0 -43
- data/spec_app/vendor/assets/bower_components/jasmine/spec/html/ResultsNodeSpec.js +0 -62
- data/spec_app/vendor/assets/bower_components/jasmine/spec/javascripts/support/jasmine_selenium_runner.yml +0 -16
- data/spec_app/vendor/assets/bower_components/jasmine/spec/performance/large_object_test.js +0 -36
- data/spec_app/vendor/assets/bower_components/jasmine/spec/performance/performance_test.js +0 -10
- data/spec_app/vendor/assets/bower_components/jasmine/spec/support/jasmine-performance.json +0 -9
- data/spec_app/vendor/assets/bower_components/jasmine/spec/support/jasmine-performance.yml +0 -9
- data/spec_app/vendor/assets/bower_components/jasmine/spec/support/jasmine.json +0 -10
- data/spec_app/vendor/assets/bower_components/jasmine/spec/support/jasmine.yml +0 -25
- data/spec_app/vendor/assets/bower_components/jasmine/src/console/ConsoleReporter.js +0 -131
- data/spec_app/vendor/assets/bower_components/jasmine/src/console/requireConsole.js +0 -12
- data/spec_app/vendor/assets/bower_components/jasmine/src/core/Any.js +0 -36
- data/spec_app/vendor/assets/bower_components/jasmine/src/core/CallTracker.js +0 -50
- data/spec_app/vendor/assets/bower_components/jasmine/src/core/Clock.js +0 -113
- data/spec_app/vendor/assets/bower_components/jasmine/src/core/DelayedFunctionScheduler.js +0 -145
- data/spec_app/vendor/assets/bower_components/jasmine/src/core/Env.js +0 -341
- data/spec_app/vendor/assets/bower_components/jasmine/src/core/ExceptionFormatter.js +0 -29
- data/spec_app/vendor/assets/bower_components/jasmine/src/core/Expectation.js +0 -107
- data/spec_app/vendor/assets/bower_components/jasmine/src/core/ExpectationResult.js +0 -45
- data/spec_app/vendor/assets/bower_components/jasmine/src/core/JsApiReporter.js +0 -73
- data/spec_app/vendor/assets/bower_components/jasmine/src/core/MockDate.js +0 -81
- data/spec_app/vendor/assets/bower_components/jasmine/src/core/ObjectContaining.js +0 -34
- data/spec_app/vendor/assets/bower_components/jasmine/src/core/PrettyPrinter.js +0 -137
- data/spec_app/vendor/assets/bower_components/jasmine/src/core/QueueRunner.js +0 -92
- data/spec_app/vendor/assets/bower_components/jasmine/src/core/ReportDispatcher.js +0 -35
- data/spec_app/vendor/assets/bower_components/jasmine/src/core/Spec.js +0 -126
- data/spec_app/vendor/assets/bower_components/jasmine/src/core/SpyStrategy.js +0 -51
- data/spec_app/vendor/assets/bower_components/jasmine/src/core/Suite.js +0 -92
- data/spec_app/vendor/assets/bower_components/jasmine/src/core/Timer.js +0 -22
- data/spec_app/vendor/assets/bower_components/jasmine/src/core/base.js +0 -102
- data/spec_app/vendor/assets/bower_components/jasmine/src/core/matchers/matchersUtil.js +0 -181
- data/spec_app/vendor/assets/bower_components/jasmine/src/core/matchers/requireMatchers.js +0 -29
- data/spec_app/vendor/assets/bower_components/jasmine/src/core/matchers/toBe.js +0 -13
- data/spec_app/vendor/assets/bower_components/jasmine/src/core/matchers/toBeCloseTo.js +0 -18
- data/spec_app/vendor/assets/bower_components/jasmine/src/core/matchers/toBeDefined.js +0 -13
- data/spec_app/vendor/assets/bower_components/jasmine/src/core/matchers/toBeFalsy.js +0 -13
- data/spec_app/vendor/assets/bower_components/jasmine/src/core/matchers/toBeGreaterThan.js +0 -15
- data/spec_app/vendor/assets/bower_components/jasmine/src/core/matchers/toBeLessThan.js +0 -14
- data/spec_app/vendor/assets/bower_components/jasmine/src/core/matchers/toBeNaN.js +0 -22
- data/spec_app/vendor/assets/bower_components/jasmine/src/core/matchers/toBeNull.js +0 -14
- data/spec_app/vendor/assets/bower_components/jasmine/src/core/matchers/toBeTruthy.js +0 -14
- data/spec_app/vendor/assets/bower_components/jasmine/src/core/matchers/toBeUndefined.js +0 -14
- data/spec_app/vendor/assets/bower_components/jasmine/src/core/matchers/toContain.js +0 -16
- data/spec_app/vendor/assets/bower_components/jasmine/src/core/matchers/toEqual.js +0 -20
- data/spec_app/vendor/assets/bower_components/jasmine/src/core/matchers/toHaveBeenCalled.js +0 -28
- data/spec_app/vendor/assets/bower_components/jasmine/src/core/matchers/toHaveBeenCalledWith.js +0 -33
- data/spec_app/vendor/assets/bower_components/jasmine/src/core/matchers/toMatch.js +0 -16
- data/spec_app/vendor/assets/bower_components/jasmine/src/core/matchers/toThrow.js +0 -46
- data/spec_app/vendor/assets/bower_components/jasmine/src/core/matchers/toThrowError.js +0 -156
- data/spec_app/vendor/assets/bower_components/jasmine/src/core/requireCore.js +0 -39
- data/spec_app/vendor/assets/bower_components/jasmine/src/core/requireInterface.js +0 -59
- data/spec_app/vendor/assets/bower_components/jasmine/src/core/util.js +0 -44
- data/spec_app/vendor/assets/bower_components/jasmine/src/html/HtmlReporter.js +0 -280
- data/spec_app/vendor/assets/bower_components/jasmine/src/html/HtmlSpecFilter.js +0 -12
- data/spec_app/vendor/assets/bower_components/jasmine/src/html/QueryString.js +0 -47
- data/spec_app/vendor/assets/bower_components/jasmine/src/html/ResultsNode.js +0 -19
- data/spec_app/vendor/assets/bower_components/jasmine/src/html/_HTMLReporter.scss +0 -355
- data/spec_app/vendor/assets/bower_components/jasmine/src/html/jasmine.scss +0 -1
- data/spec_app/vendor/assets/bower_components/jasmine/src/html/requireHtml.js +0 -6
- data/spec_app/vendor/assets/bower_components/jasmine/src/templates/example_project_jasmine_tags.html.erb +0 -3
- data/spec_app/vendor/assets/bower_components/jasmine/src/templates/version.js.erb +0 -7
- data/spec_app/vendor/assets/bower_components/jasmine/src/templates/version.rb.erb +0 -6
- data/spec_app/vendor/assets/bower_components/jasmine/src/version.js +0 -3
- data/spec_app/vendor/assets/bower_components/jasmine/travis-core-script.sh +0 -14
- data/spec_app/vendor/assets/bower_components/jasmine/travis-docs-script.sh +0 -5
- data/spec_app/vendor/assets/bower_components/jasmine/travis-node-script.sh +0 -6
- data/spec_app/vendor/assets/bower_components/jasmine-ajax/Gruntfile.js +0 -63
- data/spec_app/vendor/assets/bower_components/jasmine-ajax/src/boot.js +0 -11
- data/spec_app/vendor/assets/bower_components/jasmine-ajax/src/fakeRequest.js +0 -262
- data/spec_app/vendor/assets/bower_components/jasmine-ajax/src/mockAjax.js +0 -45
- data/spec_app/vendor/assets/bower_components/jasmine-ajax/src/paramParser.js +0 -56
- data/spec_app/vendor/assets/bower_components/jasmine-ajax/src/requestStub.js +0 -42
- data/spec_app/vendor/assets/bower_components/jasmine-ajax/src/requestTracker.js +0 -51
- data/spec_app/vendor/assets/bower_components/jasmine-ajax/src/requireAjax.js +0 -44
- data/spec_app/vendor/assets/bower_components/jasmine-ajax/src/stubTracker.js +0 -24
@@ -1,4 +1,4 @@
|
|
1
|
-
/* jasmine-fixture - 1.
|
1
|
+
/* jasmine-fixture - 1.3.3
|
2
2
|
* Makes injecting HTML snippets into the DOM easy & clean!
|
3
3
|
* https://github.com/searls/jasmine-fixture
|
4
4
|
*/
|
@@ -8,7 +8,7 @@
|
|
8
8
|
|
9
9
|
(function($) {
|
10
10
|
var ewwSideEffects, jasmineFixture, originalAffix, originalJasmineDotFixture, originalJasmineFixture, root, _, _ref;
|
11
|
-
root = this;
|
11
|
+
root = (1, eval)('this');
|
12
12
|
originalJasmineFixture = root.jasmineFixture;
|
13
13
|
originalJasmineDotFixture = (_ref = root.jasmine) != null ? _ref.fixture : void 0;
|
14
14
|
originalAffix = root.affix;
|
@@ -33,7 +33,7 @@
|
|
33
33
|
create = function(selectorOptions, attach) {
|
34
34
|
var $top;
|
35
35
|
$top = null;
|
36
|
-
_(selectorOptions.split(/[ ](?=[^\]]*?(?:\[|$))/)).inject(function($parent, elementSelector) {
|
36
|
+
_(selectorOptions.trim().split(/[ ](?![^\{]*\})(?=[^\]]*?(?:\[|$))/)).inject(function($parent, elementSelector) {
|
37
37
|
var $el;
|
38
38
|
if (elementSelector === ">") {
|
39
39
|
return $parent;
|
@@ -58,7 +58,7 @@
|
|
58
58
|
return currentJasmineFixture;
|
59
59
|
};
|
60
60
|
$whatsTheRootOf = function(that) {
|
61
|
-
if (that.jquery != null) {
|
61
|
+
if ((that != null ? that.jquery : void 0) != null) {
|
62
62
|
return that;
|
63
63
|
} else if ($('#jasmine_content').length > 0) {
|
64
64
|
return $('#jasmine_content');
|
@@ -1,5 +1,5 @@
|
|
1
|
-
/* jasmine-fixture - 1.
|
1
|
+
/* jasmine-fixture - 1.3.3
|
2
2
|
* Makes injecting HTML snippets into the DOM easy & clean!
|
3
3
|
* https://github.com/searls/jasmine-fixture
|
4
4
|
*/
|
5
|
-
(function(){var a,b=[].slice;!function(c){var d,e,f,g,h,i,j,k;return i=this,h=i.jasmineFixture,g=null!=(k=i.jasmine)?k.fixture:void 0,f=i.affix,j=function(a){return{inject:function(b,c){var d,e,f,g;for(g=[],e=0,f=a.length;f>e;e++)d=a[e],g.push(c=b(c,d));return g}}},i.jasmineFixture=function(b){var c,e,k,l,m;return e=function(a){return k.call(this,a,!0)},k=function(d,e){var f;return f=null,j(d.split(/[ ](?=[^\]]*?(?:\[|$))/)).inject(function(c,d){var g;return">"===d?c:(g=a(b,d),(e||f)&&g.appendTo(c),f||(f=g),g)},c(this)),f},m=function(){var a,b;return a=jasmine.fixture,i.jasmineFixture=h,null!=(b=i.jasmine)&&(b.fixture=g),i.affix=f,a},c=function(a){return null!=a.jquery?a:b("#jasmine_content").length>0?b("#jasmine_content"):b('<div id="jasmine_content"></div>').appendTo("body")},l={affix:e,create:k,noConflict:m},d(l),l},d=function(a){var b;return null!=(b=i.jasmine)&&(b.fixture=a),c.fn.affix=i.affix=a.affix,afterEach(function(){return c("#jasmine_content").remove()})},c?e=i.jasmineFixture(c):i.affix=function(){var a;if(a=window.jQuery||window.$,null!=a)return e=i.jasmineFixture(a),affix.call.apply(affix,[this].concat(b.call(arguments)));throw new Error("jasmine-fixture requires jQuery to be defined at window.jQuery or window.$")}}(window.jQuery||window.$),a=function(){var b,c,d,e,f,g,h,i,j,k,l,m,n,o,p,q,r,s,t,u,v,w,x,y;return a=function(j,k,l,n,o){var p,q,r,s,t,v,x,z,A,B,C,D,E,F,G,H,I,J,K,L,M,N,O;if(j.isPlainObject(k)?p=k.main:(p=k,k={main:p}),J=p,void 0===o&&(o={}),"!"===p.charAt(0)||j.isArray(l)){for(j.isArray(l)?E=p:(I=g(p,"!"),I=I.substring(I.indexOf(":")+1,I.length-1),E=i(p));"@"===E.charAt(0);)E=i("!for:!"+h(E,k));O=k,O.main=E,B=j(),"!for:"===p.substring(0,5)||j.isArray(l)?(!j.isArray(l)&&I.indexOf(":")>0&&(F=I.substring(0,I.indexOf(":")),I=I.substr(I.indexOf(":")+1)),q=j.isArray(l)?l:l[I],N=O.main,(j.isArray(q)||j.isPlainObject(q))&&j.map(q,function(b,c){var d;return O.main=N,void 0!==F&&(o[F]=c),j.isPlainObject(b)||(b={value:b}),d=a(j,O,b,n,o),0!==B.length?j.each(d,function(a,b){return B.push(b)}):void 0}),p=j.isArray(l)?"":p.substr(I.length+6+E.length)):"!if:"===p.substring(0,4)&&(L=f("!"+I+"!",l,o),("undefined"!==L||"false"!==L||""!==L)&&(B=a(j,O,l,n,o)),p=p.substr(I.length+5+E.length)),k.main=p}else if("("===p.charAt(0))K=g(p,"(",")"),G=K.substring(1,K.length-1),p=p.substr(K.length),O=k,O.main=G,B=a(j,O,l,n,o);else{if(A=p.match(y),r=A[0],0===r.length)return"";if(r.indexOf("@")>=0)return p=h(p,k),O=k,O.main=p,a(j,O,l,n,o);r=f(r,l,o),t=e(j,r),u.test(r)&&(x=u.exec(r)[1]),s=d(r,l),z="{"===r.charAt(0)?"span":"div","#"!==p.charAt(0)&&"."!==p.charAt(0)&&"{"!==p.charAt(0)&&(z=w.exec(r)[1]),-1!==r.search(m)&&(v=r.match(m)[1]),s=j.extend(s,{id:x,"class":t,html:v}),B=j("<"+z+">",s),B.attr(s),B=c(r,B,n),B=b(r,B,l),p=p.substr(A[0].length),k.main=p}return p.length>0&&(">"===p.charAt(0)&&("("===p.charAt(1)?(N=g(p.substr(1),"(",")"),p=p.substr(N.length+1)):"!"===p.charAt(1)?(I=g(p.substr(1),"!"),E=i(p.substr(1)),N=I+E,p=p.substr(N.length+1)):(H=Math.max(p.indexOf("+"),p.length),N=p.substring(1,H),p=p.substr(H)),O=k,O.main=N,D=j(a(j,O,l,n,o)),D.appendTo(B)),"+"===p.charAt(0)&&(O=k,O.main=p.substr(1),C=a(j,O,l,n,o),j.each(C,function(a,b){return B.push(b)}))),M=B},b=function(a,b,c){var d,e,f;if(0===a.search(q))return b;if(d=a.match(q),null===d)return b;for(e=0;e<d.length;)f=p.exec(d[e]),void 0===f[3]?$(b).data(f[1],c[f[1]]):$(b).data(f[1],c[f[3]]),e++;return b},c=function(a,b,c){var d,e,f,g;if(0===a.search(s))return b;if(d=a.match(s),null===d)return b;for(f=0;f<d.length;)g=r.exec(d[f]),e=void 0===g[2]?c[g[1]]:c[g[2]],$(b).bind(g[1],e),f++;return b},d=function(a,b){var c,d,e,g;if(-1===a.search(k))return void 0;for(c=a.match(k),d={},e=0;e<c.length;)g=j.exec(c[e]),d[g[1]]="",void 0!==g[3]&&(d[g[1]]=f(g[3],b)),e++;return d},e=function(a,b){var c,d,e;if(b=b.match(x)[0],-1===b.search(o))return void 0;for(c=b.match(o),d="",e=0;e<c.length;)d+=" "+n.exec(c[e])[1],e++;return a.trim(d)},f=function(a,b,c){var d;if(void 0===c&&(c={}),d=a,void 0===b)return d;for(;t.test(d);)d=d.replace(t,function(a){var
|
5
|
+
(function(){var a,b=[].slice;!function(c){var d,e,f,g,h,i,j,k;return i=(1,eval)("this"),h=i.jasmineFixture,g=null!=(k=i.jasmine)?k.fixture:void 0,f=i.affix,j=function(a){return{inject:function(b,c){var d,e,f,g;for(g=[],e=0,f=a.length;f>e;e++)d=a[e],g.push(c=b(c,d));return g}}},i.jasmineFixture=function(b){var c,e,k,l,m;return e=function(a){return k.call(this,a,!0)},k=function(d,e){var f;return f=null,j(d.trim().split(/[ ](?![^\{]*\})(?=[^\]]*?(?:\[|$))/)).inject(function(c,d){var g;return">"===d?c:(g=a(b,d),(e||f)&&g.appendTo(c),f||(f=g),g)},c(this)),f},m=function(){var a,b;return a=jasmine.fixture,i.jasmineFixture=h,null!=(b=i.jasmine)&&(b.fixture=g),i.affix=f,a},c=function(a){return null!=(null!=a?a.jquery:void 0)?a:b("#jasmine_content").length>0?b("#jasmine_content"):b('<div id="jasmine_content"></div>').appendTo("body")},l={affix:e,create:k,noConflict:m},d(l),l},d=function(a){var b;return null!=(b=i.jasmine)&&(b.fixture=a),c.fn.affix=i.affix=a.affix,afterEach(function(){return c("#jasmine_content").remove()})},c?e=i.jasmineFixture(c):i.affix=function(){var a;if(a=window.jQuery||window.$,null!=a)return e=i.jasmineFixture(a),affix.call.apply(affix,[this].concat(b.call(arguments)));throw new Error("jasmine-fixture requires jQuery to be defined at window.jQuery or window.$")}}(window.jQuery||window.$),a=function(){var b,c,d,e,f,g,h,i,j,k,l,m,n,o,p,q,r,s,t,u,v,w,x,y;return a=function(j,k,l,n,o){var p,q,r,s,t,v,x,z,A,B,C,D,E,F,G,H,I,J,K,L,M,N,O;if(j.isPlainObject(k)?p=k.main:(p=k,k={main:p}),J=p,void 0===o&&(o={}),"!"===p.charAt(0)||j.isArray(l)){for(j.isArray(l)?E=p:(I=g(p,"!"),I=I.substring(I.indexOf(":")+1,I.length-1),E=i(p));"@"===E.charAt(0);)E=i("!for:!"+h(E,k));O=k,O.main=E,B=j(),"!for:"===p.substring(0,5)||j.isArray(l)?(!j.isArray(l)&&I.indexOf(":")>0&&(F=I.substring(0,I.indexOf(":")),I=I.substr(I.indexOf(":")+1)),q=j.isArray(l)?l:l[I],N=O.main,(j.isArray(q)||j.isPlainObject(q))&&j.map(q,function(b,c){var d;return O.main=N,void 0!==F&&(o[F]=c),j.isPlainObject(b)||(b={value:b}),d=a(j,O,b,n,o),0!==B.length?j.each(d,function(a,b){return B.push(b)}):void 0}),p=j.isArray(l)?"":p.substr(I.length+6+E.length)):"!if:"===p.substring(0,4)&&(L=f("!"+I+"!",l,o),("undefined"!==L||"false"!==L||""!==L)&&(B=a(j,O,l,n,o)),p=p.substr(I.length+5+E.length)),k.main=p}else if("("===p.charAt(0))K=g(p,"(",")"),G=K.substring(1,K.length-1),p=p.substr(K.length),O=k,O.main=G,B=a(j,O,l,n,o);else{if(A=p.match(y),r=A[0],0===r.length)return"";if(r.indexOf("@")>=0)return p=h(p,k),O=k,O.main=p,a(j,O,l,n,o);r=f(r,l,o),t=e(j,r),u.test(r)&&(x=u.exec(r)[1]),s=d(r,l),z="{"===r.charAt(0)?"span":"div","#"!==p.charAt(0)&&"."!==p.charAt(0)&&"{"!==p.charAt(0)&&(z=w.exec(r)[1]),-1!==r.search(m)&&(v=r.match(m)[1]),s=j.extend(s,{id:x,"class":t,html:v}),B=j("<"+z+">",s),B.attr(s),B=c(r,B,n),B=b(r,B,l),p=p.substr(A[0].length),k.main=p}return p.length>0&&(">"===p.charAt(0)&&("("===p.charAt(1)?(N=g(p.substr(1),"(",")"),p=p.substr(N.length+1)):"!"===p.charAt(1)?(I=g(p.substr(1),"!"),E=i(p.substr(1)),N=I+E,p=p.substr(N.length+1)):(H=Math.max(p.indexOf("+"),p.length),N=p.substring(1,H),p=p.substr(H)),O=k,O.main=N,D=j(a(j,O,l,n,o)),D.appendTo(B)),"+"===p.charAt(0)&&(O=k,O.main=p.substr(1),C=a(j,O,l,n,o),j.each(C,function(a,b){return B.push(b)}))),M=B},b=function(a,b,c){var d,e,f;if(0===a.search(q))return b;if(d=a.match(q),null===d)return b;for(e=0;e<d.length;)f=p.exec(d[e]),void 0===f[3]?$(b).data(f[1],c[f[1]]):$(b).data(f[1],c[f[3]]),e++;return b},c=function(a,b,c){var d,e,f,g;if(0===a.search(s))return b;if(d=a.match(s),null===d)return b;for(f=0;f<d.length;)g=r.exec(d[f]),e=void 0===g[2]?c[g[1]]:c[g[2]],$(b).bind(g[1],e),f++;return b},d=function(a,b){var c,d,e,g;if(-1===a.search(k))return void 0;for(c=a.match(k),d={},e=0;e<c.length;)g=j.exec(c[e]),d[g[1]]="",void 0!==g[3]&&(d[g[1]]=f(g[3],b)),e++;return d},e=function(a,b){var c,d,e;if(b=b.match(x)[0],-1===b.search(o))return void 0;for(c=b.match(o),d="",e=0;e<c.length;)d+=" "+n.exec(c[e])[1],e++;return a.trim(d)},f=function(a,b,c){var d;if(void 0===c&&(c={}),d=a,void 0===b)return d;for(;t.test(d);)d=d.replace(t,function(a,d){var e,f,g;return e="",a.indexOf("!for:")>0||a.indexOf("!if:")>0?a:("!"!==a.charAt(0)&&(e=a.charAt(0),a=a.substring(2,a.length-1)),f=new Function("data","indexes","var r=undefined;with(data){try{r="+a+";}catch(e){}}with(indexes){try{if(r===undefined)r="+a+";}catch(e){}}return r;"),g=unescape(f(b,c)),e+g)});return d=d.replace(/\\./g,function(a){return a.charAt(1)}),unescape(d)},g=function(a,b,c,d){var e,f;if(void 0===c&&(c=b),e=1,void 0===d&&(d=a.charAt(0)===b?1:0),0!==d){for(;d>0&&e<a.length;)a.charAt(e)===c&&"\\"!==a.charAt(e-1)?d--:a.charAt(e)===b&&"\\"!==a.charAt(e-1)&&d++,e++;return f=a.substring(0,e)}},h=function(a,b){return a=a.replace(v,function(a){var c;return a=a.substr(1),(c=new Function("objs",'var r="";with(objs){try{r='+a+";}catch(e){}}return r;"))(b,h)})},i=function(a){var b,c,d;return"!for:"!==a.substring(0,5)&&"!if:"!==a.substring(0,4)?void 0:(b=g(a,"!"),a=a.substr(b.length),"("===a.charAt(0)?g(a,"(",")"):(d=a.match(y)[0],a=a.substr(d.length),0===a.length||"+"===a.charAt(0)?d:">"===a.charAt(0)?(c="",c=g(a.substr(1),"(",")",1),d+">"+c):void 0))},y=/([#\.\@]?[\w-]+|\[([\w-!?=:"']+(="([^"]|\\")+")? {0,})+\]|\~[\w$]+=[\w$]+|&[\w$]+(=[\w$]+)?|[#\.\@]?!([^!]|\\!)+!){0,}(\{([^\}]|\\\})+\})?/i,w=/(\w+)/i,u=/(?:^|\b)#([\w-!]+)/i,x=/((([#\.]?[\w-]+)?(\[([\w!]+(="([^"]|\\")+")? {0,})+\])?)+)/i,o=/(\.[\w-]+)(?!["\w])/g,n=/\.([\w-]+)/i,v=/(@[\w$_][\w$_\d]+)/i,k=/(\[([\w-!]+(="?([^"]|\\")+"?)? {0,})+\])/gi,l=/([\w-!]+(="([^"]|\\")+")?)/g,j=/([\w-!]+)(="?((([\w]+(\[.*?\])+)|[^"\]]|\\")+)"?)?/i,m=/\{(([^\}]|\\\})+)\}/i,t=/(?:([^\\]|^))!([^!]|\\!)+!/g,s=/\~[\w$]+(=[\w$]+)?/g,r=/\~([\w$]+)=([\w$]+)/i,q=/&[\w$]+(=[\w$]+)?/g,p=/&([\w$]+)(=([\w$]+))?/i,a}()}).call(this);
|
@@ -1,6 +1,5 @@
|
|
1
1
|
{
|
2
2
|
"name": "jasmine-jquery",
|
3
|
-
"version": "2.0.5",
|
4
3
|
"main": "lib/jasmine-jquery.js",
|
5
4
|
"ignore": [
|
6
5
|
"test",
|
@@ -14,11 +13,12 @@
|
|
14
13
|
"jquery": ">=2"
|
15
14
|
},
|
16
15
|
"homepage": "https://github.com/velesin/jasmine-jquery",
|
17
|
-
"
|
16
|
+
"version": "2.1.1",
|
17
|
+
"_release": "2.1.1",
|
18
18
|
"_resolution": {
|
19
19
|
"type": "version",
|
20
|
-
"tag": "2.
|
21
|
-
"commit": "
|
20
|
+
"tag": "2.1.1",
|
21
|
+
"commit": "fdd234f58d4997ec13400ba4f070e8a803f6ecbe"
|
22
22
|
},
|
23
23
|
"_source": "git://github.com/velesin/jasmine-jquery.git",
|
24
24
|
"_target": "*",
|
@@ -28,6 +28,22 @@ module.exports = function (grunt) {
|
|
28
28
|
grunt.loadNpmTasks('grunt-contrib-jshint')
|
29
29
|
grunt.loadNpmTasks('grunt-contrib-jasmine')
|
30
30
|
|
31
|
+
grunt.registerTask('syncversion', "Sync the versions between files.", function () {
|
32
|
+
var json = require('./package.json')
|
33
|
+
var fs = require('fs')
|
34
|
+
var file = './lib/jasmine-jquery.js'
|
35
|
+
|
36
|
+
fs.readFile(file, 'utf8', function (err, data) {
|
37
|
+
if (err) return console.log(err)
|
38
|
+
|
39
|
+
var res = data.replace(/^Version .*$/m, 'Version ' + json.version)
|
40
|
+
|
41
|
+
fs.writeFile(file, res, 'utf8', function (err) {
|
42
|
+
if (err) return console.log(err)
|
43
|
+
})
|
44
|
+
})
|
45
|
+
})
|
46
|
+
|
31
47
|
grunt.registerTask('test', ['jshint', 'jasmine'])
|
32
|
-
grunt.registerTask('default', ['test'])
|
48
|
+
grunt.registerTask('default', ['syncversion', 'test'])
|
33
49
|
};
|
File without changes
|
@@ -1,20 +1,23 @@
|
|
1
1
|
# jasmine-jquery [![Build Status](https://travis-ci.org/velesin/jasmine-jquery.png)](https://travis-ci.org/velesin/jasmine-jquery)
|
2
2
|
|
3
3
|
|
4
|
-
jasmine-jquery provides two extensions for [Jasmine](http://
|
4
|
+
jasmine-jquery provides two extensions for the [Jasmine](http://jasmine.github.io/) JavaScript Testing Framework:
|
5
5
|
|
6
6
|
- a set of custom matchers for jQuery framework
|
7
7
|
- an API for handling HTML, CSS, and JSON fixtures in your specs
|
8
8
|
|
9
9
|
## Installation
|
10
10
|
|
11
|
-
|
11
|
+
Choose one of the following options:
|
12
|
+
|
13
|
+
- Simply download _jasmine-jquery.js_ from [here](https://raw.github.com/velesin/jasmine-jquery/master/lib/jasmine-jquery.js) and include it in your Jasmine's test runner file (or add it to _jasmine.yml_ file if you're using Ruby with [jasmine-gem](http://github.com/jasmine/jasmine-gem)). Remember to also include the jQuery library as jasmine-jquery relies on it.
|
14
|
+
- Using bower by running ```bower install jasmine-jquery --save```
|
15
|
+
- For Ruby on Rails, use this [gem](https://github.com/travisjeffery/jasmine-jquery-rails) or I recommend to comply with the standard RSpec and Jasmine frameworks dir structure and keep your tests in `spec/javascripts/` dir. I put jasmine-jquery (and other libraries like jasmine-ajax) into `spec/javascripts/helpers` dir (so they are automatically loaded) and fixtures into `spec/javascripts/fixtures` dir.
|
12
16
|
|
13
|
-
For Ruby on Rails, use this [gem](https://github.com/travisjeffery/jasmine-jquery-rails) or I recommend to comply with the standard RSpec and Jasmine frameworks dir structure and keep your tests in `spec/javascripts/` dir. I put jasmine-jquery (and other libraries like jasmine-ajax) into `spec/javascripts/helpers` dir (so they are automatically loaded) and fixtures into `spec/javascripts/fixtures` dir.
|
14
17
|
|
15
18
|
## jQuery matchers
|
16
19
|
|
17
|
-
jasmine-jquery provides following custom matchers (in alphabetical order):
|
20
|
+
jasmine-jquery provides the following custom matchers (in alphabetical order):
|
18
21
|
|
19
22
|
- `toBeChecked()`
|
20
23
|
- only for tags that have checked attribute
|
@@ -32,7 +35,7 @@ jasmine-jquery provides following custom matchers (in alphabetical order):
|
|
32
35
|
- Their `width` and `height` are explicitly set to `0`.
|
33
36
|
- An ancestor element is hidden, so the element is not shown on the page.
|
34
37
|
- `toBeInDOM()`
|
35
|
-
-
|
38
|
+
- Checks to see if the matched element is attached to the DOM
|
36
39
|
- e.g. `expect($('#id-name')[0]).toBeInDOM()`
|
37
40
|
- `toBeMatchedBy(jQuerySelector)`
|
38
41
|
- Check to see if the set of matched elements matches the given selector
|
@@ -43,6 +46,8 @@ jasmine-jquery provides following custom matchers (in alphabetical order):
|
|
43
46
|
- e.g. `expect($('<option selected="selected"></option>')).toBeSelected()`
|
44
47
|
- `toBeVisible()`
|
45
48
|
- Elements are considered visible if they consume space in the document. Visible elements have a width or height that is greater than zero.
|
49
|
+
- `toContain(string)`
|
50
|
+
- e.g. `expect($('<div><span class="some-class"></span></div>')).toContain('some-class')`
|
46
51
|
- `toContainElement(jQuerySelector)`
|
47
52
|
- e.g. `expect($('<div><span class="some-class"></span></div>')).toContainElement('span.some-class')`
|
48
53
|
- `toContainHtml(string)`
|
@@ -92,13 +97,13 @@ jasmine-jquery provides following custom matchers (in alphabetical order):
|
|
92
97
|
- only for elements on which `val` can be called (`input`, `textarea`, etc)
|
93
98
|
- e.g. `expect($('<input type="text" value="some text"/>')).toHaveValue('some text')`
|
94
99
|
|
95
|
-
The same as with standard Jasmine matchers, all of above custom matchers may be inverted by using `.not` prefix, e.g.:
|
100
|
+
The same as with standard Jasmine matchers, all of the above custom matchers may be inverted by using `.not` prefix, e.g.:
|
96
101
|
|
97
102
|
expect($('<div>some text</div>')).not.toHaveText(/other/)
|
98
103
|
|
99
104
|
## HTML Fixtures
|
100
105
|
|
101
|
-
The Fixture module of jasmine-jquery allows you to load HTML content to be used by your tests. The overall workflow is
|
106
|
+
The Fixture module of jasmine-jquery allows you to load HTML content to be used by your tests. The overall workflow is as follows:
|
102
107
|
|
103
108
|
In _myfixture.html_ file:
|
104
109
|
|
@@ -112,7 +117,7 @@ Inside your test:
|
|
112
117
|
|
113
118
|
By default, fixtures are loaded from `spec/javascripts/fixtures`. You can configure this path: `jasmine.getFixtures().fixturesPath = 'my/new/path';`.
|
114
119
|
|
115
|
-
Your fixture is being loaded into `<div id="jasmine-fixtures"></div>` container that is automatically added to the DOM by the Fixture module (If you _REALLY_ must change id of this container, try: `jasmine.getFixtures().containerId = 'my-new-id';` in your test runner). To make tests fully independent, fixtures container is automatically cleaned-up between tests, so you don't have to worry about left-overs from fixtures loaded in preceeding test. Also, fixtures are internally cached by the Fixture module, so you can load the same fixture file in several tests without penalty to your test suite's speed.
|
120
|
+
Your fixture is being loaded into the `<div id="jasmine-fixtures"></div>` container that is automatically added to the DOM by the Fixture module (If you _REALLY_ must change the id of this container, try: `jasmine.getFixtures().containerId = 'my-new-id';` in your test runner). To make tests fully independent, fixtures container is automatically cleaned-up between tests, so you don't have to worry about left-overs from fixtures loaded in preceeding test. Also, fixtures are internally cached by the Fixture module, so you can load the same fixture file in several tests without penalty to your test suite's speed.
|
116
121
|
|
117
122
|
To invoke fixture related methods, obtain Fixtures singleton through a factory and invoke a method on it:
|
118
123
|
|
@@ -349,7 +354,7 @@ Under Windows 7, you have to launch `C:\Users\[UserName]\AppData\Local\Google\Ch
|
|
349
354
|
|
350
355
|
## Mocking with jasmine-ajax
|
351
356
|
|
352
|
-
[jasmine-ajax](https://github.com/
|
357
|
+
[jasmine-ajax](https://github.com/jasmine/jasmine-ajax) library doesn't let user to manually start / stop XMLHttpRequest mocking, but instead it overrides XMLHttpRequest automatically when loaded. This breaks jasmine-jquery fixtures as fixture loading mechanism uses jQuery.ajax, that stops to function the very moment jasmine-ajax is loaded. A workaround for this may be to invoke jasmine-jquery `preloadFixtures` function (specifying all required fixtures) before jasmine-ajax is loaded. This way subsequent calls to `loadFixtures` or `readFixtures` methods will get fixtures content from cache, without need to use jQuery.ajax and thus will work correctly even after jasmine-ajax is loaded.
|
353
358
|
|
354
359
|
## Testing with Javascript Test Driver
|
355
360
|
|
@@ -1,7 +1,7 @@
|
|
1
1
|
/*!
|
2
2
|
Jasmine-jQuery: a set of jQuery helpers for Jasmine tests.
|
3
3
|
|
4
|
-
Version 2.
|
4
|
+
Version 2.1.1
|
5
5
|
|
6
6
|
https://github.com/velesin/jasmine-jquery
|
7
7
|
|
@@ -27,7 +27,13 @@ OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION
|
|
27
27
|
WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
|
28
28
|
*/
|
29
29
|
|
30
|
-
|
30
|
+
(function (root, factory) {
|
31
|
+
if (typeof module !== 'undefined' && module.exports) {
|
32
|
+
factory(root, root.jasmine, require('jquery'));
|
33
|
+
} else {
|
34
|
+
factory(root, root.jasmine, root.jQuery);
|
35
|
+
}
|
36
|
+
}((function() {return this; })(), function (window, jasmine, $) { "use strict";
|
31
37
|
|
32
38
|
jasmine.spiedEventsKey = function (selector, eventName) {
|
33
39
|
return [$(selector).selector, eventName].toString()
|
@@ -125,6 +131,7 @@ WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
|
|
125
131
|
async: false, // must be synchronous to guarantee that no tests are run before fixture is loaded
|
126
132
|
cache: false,
|
127
133
|
url: url,
|
134
|
+
dataType: 'html',
|
128
135
|
success: function (data, status, $xhr) {
|
129
136
|
htmlText = $xhr.responseText
|
130
137
|
}
|
@@ -144,7 +151,7 @@ WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
|
|
144
151
|
htmlText += '<script>' + $xhr.responseText + '</script>'
|
145
152
|
},
|
146
153
|
error: function ($xhr, status, err) {
|
147
|
-
throw new Error('Script could not be loaded: ' +
|
154
|
+
throw new Error('Script could not be loaded: ' + url + ' (status: ' + status + ', message: ' + err.message + ')')
|
148
155
|
}
|
149
156
|
});
|
150
157
|
})
|
@@ -283,7 +290,11 @@ WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
|
|
283
290
|
jasmine.jQuery.events = {
|
284
291
|
spyOn: function (selector, eventName) {
|
285
292
|
var handler = function (e) {
|
286
|
-
data.spiedEvents[jasmine.spiedEventsKey(selector, eventName)]
|
293
|
+
var calls = (typeof data.spiedEvents[jasmine.spiedEventsKey(selector, eventName)] !== 'undefined') ? data.spiedEvents[jasmine.spiedEventsKey(selector, eventName)].calls : 0
|
294
|
+
data.spiedEvents[jasmine.spiedEventsKey(selector, eventName)] = {
|
295
|
+
args: jasmine.util.argsToArray(arguments),
|
296
|
+
calls: ++calls
|
297
|
+
}
|
287
298
|
}
|
288
299
|
|
289
300
|
$(selector).on(eventName, handler)
|
@@ -295,12 +306,22 @@ WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
|
|
295
306
|
handler: handler,
|
296
307
|
reset: function (){
|
297
308
|
delete data.spiedEvents[jasmine.spiedEventsKey(selector, eventName)]
|
309
|
+
},
|
310
|
+
calls: {
|
311
|
+
count: function () {
|
312
|
+
return data.spiedEvents[jasmine.spiedEventsKey(selector, eventName)] ?
|
313
|
+
data.spiedEvents[jasmine.spiedEventsKey(selector, eventName)].calls : 0;
|
314
|
+
},
|
315
|
+
any: function () {
|
316
|
+
return data.spiedEvents[jasmine.spiedEventsKey(selector, eventName)] ?
|
317
|
+
!!data.spiedEvents[jasmine.spiedEventsKey(selector, eventName)].calls : false;
|
318
|
+
}
|
298
319
|
}
|
299
320
|
}
|
300
321
|
},
|
301
322
|
|
302
323
|
args: function (selector, eventName) {
|
303
|
-
var actualArgs = data.spiedEvents[jasmine.spiedEventsKey(selector, eventName)]
|
324
|
+
var actualArgs = data.spiedEvents[jasmine.spiedEventsKey(selector, eventName)].args
|
304
325
|
|
305
326
|
if (!actualArgs) {
|
306
327
|
throw "There is no spy for " + eventName + " on " + selector.toString() + ". Make sure to create a spy using spyOnEvent."
|
@@ -319,19 +340,22 @@ WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
|
|
319
340
|
if (Object.prototype.toString.call(expectedArgs) !== '[object Array]')
|
320
341
|
actualArgs = actualArgs[0]
|
321
342
|
|
322
|
-
return util.equals(
|
343
|
+
return util.equals(actualArgs, expectedArgs, customEqualityTesters)
|
323
344
|
},
|
324
345
|
|
325
346
|
wasPrevented: function (selector, eventName) {
|
326
|
-
var
|
347
|
+
var spiedEvent = data.spiedEvents[jasmine.spiedEventsKey(selector, eventName)]
|
348
|
+
, args = (jasmine.util.isUndefined(spiedEvent)) ? {} : spiedEvent.args
|
327
349
|
, e = args ? args[0] : undefined
|
328
350
|
|
329
351
|
return e && e.isDefaultPrevented()
|
330
352
|
},
|
331
353
|
|
332
354
|
wasStopped: function (selector, eventName) {
|
333
|
-
var
|
355
|
+
var spiedEvent = data.spiedEvents[jasmine.spiedEventsKey(selector, eventName)]
|
356
|
+
, args = (jasmine.util.isUndefined(spiedEvent)) ? {} : spiedEvent.args
|
334
357
|
, e = args ? args[0] : undefined
|
358
|
+
|
335
359
|
return e && e.isPropagationStopped()
|
336
360
|
},
|
337
361
|
|
@@ -527,7 +551,6 @@ WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
|
|
527
551
|
toContainElement: function () {
|
528
552
|
return {
|
529
553
|
compare: function (actual, selector) {
|
530
|
-
if (window.debug) debugger
|
531
554
|
return { pass: $(actual).find(selector).length }
|
532
555
|
}
|
533
556
|
}
|
@@ -560,6 +583,7 @@ WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
|
|
560
583
|
toHandle: function () {
|
561
584
|
return {
|
562
585
|
compare: function (actual, event) {
|
586
|
+
if ( !actual || actual.length === 0 ) return { pass: false };
|
563
587
|
var events = $._data($(actual).get(0), "events")
|
564
588
|
|
565
589
|
if (!events || !event || typeof event !== "string") {
|
@@ -590,6 +614,7 @@ WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
|
|
590
614
|
toHandleWith: function () {
|
591
615
|
return {
|
592
616
|
compare: function (actual, eventName, eventHandler) {
|
617
|
+
if ( !actual || actual.length === 0 ) return { pass: false };
|
593
618
|
var normalizedEventName = eventName.split('.')[0]
|
594
619
|
, stack = $._data($(actual).get(0), "events")[normalizedEventName]
|
595
620
|
|
@@ -810,4 +835,4 @@ WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
|
|
810
835
|
window.getJSONFixture = function (url) {
|
811
836
|
return jasmine.getJSONFixtures().proxyCallTo_('read', arguments)[url]
|
812
837
|
}
|
813
|
-
}
|
838
|
+
}));
|
@@ -1,26 +1,35 @@
|
|
1
1
|
{
|
2
|
-
|
3
|
-
|
4
|
-
|
5
|
-
|
6
|
-
|
7
|
-
|
8
|
-
|
9
|
-
|
10
|
-
|
2
|
+
"name": "jasmine-jquery",
|
3
|
+
"description": "jQuery matchers and fixture loader for Jasmine framework",
|
4
|
+
"version": "2.1.1",
|
5
|
+
"keywords": [
|
6
|
+
"jasmine",
|
7
|
+
"jquery"
|
8
|
+
],
|
9
|
+
"main": "lib/jasmine-jquery.js",
|
10
|
+
"files": [
|
11
|
+
"lib/"
|
12
|
+
],
|
13
|
+
"homepage": "http://github.com/velesin/jasmine-jquery",
|
14
|
+
"author": {
|
15
|
+
"name": "Travis Jeffery",
|
16
|
+
"email": "tj@travisjeffery.com",
|
17
|
+
"url": "travisjeffery.com"
|
18
|
+
},
|
19
|
+
"scripts": {
|
20
|
+
"test": "grunt test"
|
21
|
+
},
|
22
|
+
"repository": {
|
23
|
+
"type": "git",
|
24
|
+
"url": "https://github.com/velesin/jasmine-jquery.git"
|
25
|
+
},
|
26
|
+
"bugs": {
|
27
|
+
"url": "http://github.com/velesin/jasmine-jquery/issues"
|
28
|
+
},
|
29
|
+
"license": "MIT",
|
30
|
+
"devDependencies": {
|
31
|
+
"grunt": "0.4.5",
|
32
|
+
"grunt-contrib-jshint": "0.10.0",
|
33
|
+
"grunt-contrib-jasmine": "git://github.com/travisjeffery/grunt-contrib-jasmine#9d5874dd592cf41e8268918fe9baeb261afd75b2"
|
11
34
|
}
|
12
|
-
|
13
|
-
, "repository": {
|
14
|
-
"type": "git"
|
15
|
-
, "url": "https://github.com/velesin/jasmine-jquery.git"
|
16
|
-
}
|
17
|
-
, "bugs": {
|
18
|
-
"url": "http://github.com/velesin/jasmine-jquery/issues"
|
19
|
-
}
|
20
|
-
, "license": "MIT"
|
21
|
-
, "devDependencies": {
|
22
|
-
"grunt": "~0.4.1"
|
23
|
-
, "grunt-contrib-jshint": "~0.6.0"
|
24
|
-
, "grunt-contrib-jasmine": "git://github.com/travisjeffery/grunt-contrib-jasmine#9d5874dd592cf41e8268918fe9baeb261afd75b2"
|
25
|
-
}
|
26
|
-
}
|
35
|
+
}
|
data/spec_app/vendor/assets/bower_components/jasmine-jquery/spec/suites/jasmine-jquery-spec.js
CHANGED
@@ -425,6 +425,15 @@ describe("jasmine.Fixtures using real AJAX call", function () {
|
|
425
425
|
expect($("#anchor_01").length).toBe(1)
|
426
426
|
})
|
427
427
|
})
|
428
|
+
|
429
|
+
describe("When the fixture contains a HTML 5 style checked checkbox", function () {
|
430
|
+
var fixtureUrl = "fixture_with_checkbox_with_checked.html"
|
431
|
+
|
432
|
+
it("Then the fixture is loaded successfully", function () {
|
433
|
+
jasmine.getFixtures().load(fixtureUrl)
|
434
|
+
expect('#' + jasmine.getFixtures().containerId).toContainElement('#checked-box')
|
435
|
+
})
|
436
|
+
})
|
428
437
|
})
|
429
438
|
|
430
439
|
describe("jQuery matcher", function () {
|
@@ -1023,9 +1032,10 @@ describe("jQuery matcher", function () {
|
|
1023
1032
|
})
|
1024
1033
|
|
1025
1034
|
describe('toHaveBeenTriggeredOn', function () {
|
1035
|
+
var spyEvents = {}
|
1026
1036
|
beforeEach(function () {
|
1027
1037
|
setFixtures(sandbox().html('<a id="clickme">Click Me</a> <a id="otherlink">Other Link</a>'))
|
1028
|
-
spyOnEvent($('#clickme'), 'click')
|
1038
|
+
spyEvents['#clickme'] = spyOnEvent($('#clickme'), 'click')
|
1029
1039
|
spyOnEvent(document, 'click')
|
1030
1040
|
spyOnEvent($('#otherlink'), 'click')
|
1031
1041
|
})
|
@@ -1058,6 +1068,20 @@ describe("jQuery matcher", function () {
|
|
1058
1068
|
expect('click').not.toHaveBeenTriggeredOn($('#clickme'))
|
1059
1069
|
expect('click').not.toHaveBeenTriggeredOn('#clickme')
|
1060
1070
|
})
|
1071
|
+
|
1072
|
+
it('should pass if the event call count is incremented', function () {
|
1073
|
+
expect(spyEvents['#clickme'].calls.any()).toEqual(false);
|
1074
|
+
expect(spyEvents['#clickme'].calls.count()).toEqual(0);
|
1075
|
+
$('#clickme').click()
|
1076
|
+
expect('click').toHaveBeenTriggeredOn($('#clickme'))
|
1077
|
+
expect('click').toHaveBeenTriggeredOn('#clickme')
|
1078
|
+
expect(spyEvents['#clickme'].calls.count()).toEqual(1);
|
1079
|
+
expect(spyEvents['#clickme'].calls.any()).toEqual(true);
|
1080
|
+
$('#clickme').click()
|
1081
|
+
$('#clickme').click()
|
1082
|
+
expect(spyEvents['#clickme'].calls.count()).toEqual(3);
|
1083
|
+
expect(spyEvents['#clickme'].calls.any()).toEqual(true);
|
1084
|
+
})
|
1061
1085
|
})
|
1062
1086
|
|
1063
1087
|
describe('toHaveBeenTriggeredOnAndWith', function () {
|
@@ -1090,6 +1114,11 @@ describe("jQuery matcher", function () {
|
|
1090
1114
|
$(document).trigger('event', { different_key: "value1" })
|
1091
1115
|
expect('event').not.toHaveBeenTriggeredOnAndWith(document, { key1: "value1" })
|
1092
1116
|
})
|
1117
|
+
|
1118
|
+
it('should pass if the arguments match using jasmine.objectContaining', function () {
|
1119
|
+
$(document).trigger('event', { key1: "value1", key2: "value2" })
|
1120
|
+
expect('event').toHaveBeenTriggeredOnAndWith(document, jasmine.objectContaining({ key1: "value1" }))
|
1121
|
+
})
|
1093
1122
|
})
|
1094
1123
|
|
1095
1124
|
describe("when extra parameter is an array", function () {
|
@@ -1150,6 +1179,19 @@ describe("jQuery matcher", function () {
|
|
1150
1179
|
expect('click').not.toHaveBeenTriggeredOn('#clickme')
|
1151
1180
|
expect(spyEvents['#clickme']).not.toHaveBeenTriggered()
|
1152
1181
|
})
|
1182
|
+
|
1183
|
+
it('should pass if the event call count is incremented', function () {
|
1184
|
+
expect(spyEvents['#clickme'].calls.any()).toEqual(false);
|
1185
|
+
expect(spyEvents['#clickme'].calls.count()).toEqual(0);
|
1186
|
+
$('#clickme').click()
|
1187
|
+
expect(spyEvents['#clickme']).toHaveBeenTriggered()
|
1188
|
+
expect(spyEvents['#clickme'].calls.count()).toEqual(1);
|
1189
|
+
expect(spyEvents['#clickme'].calls.any()).toEqual(true);
|
1190
|
+
$('#clickme').click()
|
1191
|
+
$('#clickme').click()
|
1192
|
+
expect(spyEvents['#clickme'].calls.count()).toEqual(3);
|
1193
|
+
expect(spyEvents['#clickme'].calls.any()).toEqual(true);
|
1194
|
+
})
|
1153
1195
|
})
|
1154
1196
|
|
1155
1197
|
describe('toHaveBeenPreventedOn', function () {
|
@@ -1338,6 +1380,15 @@ describe("jQuery matcher", function () {
|
|
1338
1380
|
$(object).bind('click', function (){})
|
1339
1381
|
expect($(object)).toHandle('click')
|
1340
1382
|
})
|
1383
|
+
|
1384
|
+
it('should not fail when actual has no matches', function (){
|
1385
|
+
expect($('#notreal')).not.toHandle('click')
|
1386
|
+
})
|
1387
|
+
|
1388
|
+
it('should not fail when actual is null', function (){
|
1389
|
+
expect(null).not.toHandle('click')
|
1390
|
+
})
|
1391
|
+
|
1341
1392
|
})
|
1342
1393
|
|
1343
1394
|
describe('toHandleWith', function () {
|
@@ -1412,6 +1463,15 @@ describe("jQuery matcher", function () {
|
|
1412
1463
|
$(object).bind('click.namespaced', handler)
|
1413
1464
|
expect($(object)).toHandleWith('click.namespaced', handler)
|
1414
1465
|
})
|
1466
|
+
|
1467
|
+
it('should not fail when actual has no matches', function (){
|
1468
|
+
expect($('#notreal')).not.toHandleWith('click')
|
1469
|
+
})
|
1470
|
+
|
1471
|
+
it('should not fail when actual is null', function (){
|
1472
|
+
expect(null).not.toHandleWith('click')
|
1473
|
+
})
|
1474
|
+
|
1415
1475
|
})
|
1416
1476
|
})
|
1417
1477
|
|
@@ -1,11 +1,12 @@
|
|
1
1
|
{
|
2
2
|
"name": "jquery",
|
3
|
-
"version": "2.1.
|
3
|
+
"version": "2.1.4",
|
4
4
|
"main": "dist/jquery.js",
|
5
5
|
"license": "MIT",
|
6
6
|
"ignore": [
|
7
7
|
"**/.*",
|
8
8
|
"build",
|
9
|
+
"dist/cdn",
|
9
10
|
"speed",
|
10
11
|
"test",
|
11
12
|
"*.md",
|
@@ -25,11 +26,11 @@
|
|
25
26
|
"library"
|
26
27
|
],
|
27
28
|
"homepage": "https://github.com/jquery/jquery",
|
28
|
-
"_release": "2.1.
|
29
|
+
"_release": "2.1.4",
|
29
30
|
"_resolution": {
|
30
31
|
"type": "version",
|
31
|
-
"tag": "2.1.
|
32
|
-
"commit": "
|
32
|
+
"tag": "2.1.4",
|
33
|
+
"commit": "7751e69b615c6eca6f783a81e292a55725af6b85"
|
33
34
|
},
|
34
35
|
"_source": "git://github.com/jquery/jquery.git",
|
35
36
|
"_target": ">=2",
|
@@ -1,5 +1,5 @@
|
|
1
1
|
/*!
|
2
|
-
* jQuery JavaScript Library v2.1.
|
2
|
+
* jQuery JavaScript Library v2.1.4
|
3
3
|
* http://jquery.com/
|
4
4
|
*
|
5
5
|
* Includes Sizzle.js
|
@@ -9,7 +9,7 @@
|
|
9
9
|
* Released under the MIT license
|
10
10
|
* http://jquery.org/license
|
11
11
|
*
|
12
|
-
* Date:
|
12
|
+
* Date: 2015-04-28T16:01Z
|
13
13
|
*/
|
14
14
|
|
15
15
|
(function( global, factory ) {
|
@@ -67,7 +67,7 @@ var
|
|
67
67
|
// Use the correct document accordingly with window argument (sandbox)
|
68
68
|
document = window.document,
|
69
69
|
|
70
|
-
version = "2.1.
|
70
|
+
version = "2.1.4",
|
71
71
|
|
72
72
|
// Define a local copy of jQuery
|
73
73
|
jQuery = function( selector, context ) {
|
@@ -531,7 +531,12 @@ jQuery.each("Boolean Number String Function Array Date RegExp Object Error".spli
|
|
531
531
|
});
|
532
532
|
|
533
533
|
function isArraylike( obj ) {
|
534
|
-
|
534
|
+
|
535
|
+
// Support: iOS 8.2 (not reproducible in simulator)
|
536
|
+
// `in` check used to prevent JIT error (gh-2145)
|
537
|
+
// hasOwn isn't used here due to false negatives
|
538
|
+
// regarding Nodelist length in IE
|
539
|
+
var length = "length" in obj && obj.length,
|
535
540
|
type = jQuery.type( obj );
|
536
541
|
|
537
542
|
if ( type === "function" || jQuery.isWindow( obj ) ) {
|