jasmine-rails 0.5.4 → 0.5.5
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- data/README.md +2 -2
- data/lib/generators/jasmine_rails/templates/jasmine.yml +5 -5
- data/lib/jasmine-rails.rb +2 -1
- data/lib/jasmine_rails/version.rb +1 -1
- metadata +4 -4
data/README.md
CHANGED
@@ -114,7 +114,7 @@ In my workflow, I like to work with specs in the command line until I hit a snag
|
|
114
114
|
|
115
115
|
### From the command line
|
116
116
|
|
117
|
-
Even though they both read from the same config file, it's certainly possible that your specs will pass in the browser and fail from the command line. In this case, you can try to debug or analyze what's going on loading the headless runner.html file into your browser environment. The generated runner.html file is written out to `
|
117
|
+
Even though they both read from the same config file, it's certainly possible that your specs will pass in the browser and fail from the command line. In this case, you can try to debug or analyze what's going on loading the headless runner.html file into your browser environment. The generated runner.html file is written out to `tmp/jasmine/runner.html` after each run.
|
118
118
|
|
119
119
|
### Ajax / XHRs
|
120
120
|
|
@@ -123,6 +123,6 @@ As a general rule, Jasmine is designed for unit testing, and as a result real ne
|
|
123
123
|
If your application code issues XHR requests during your test run, please note that **XHR requests for the local filesystem** are blocked by default for most browsers for security reasons. To debug local XHR requests (for example, if you jasmine-jquery fixtures), you will need to enable local filesystem requests in your browser.
|
124
124
|
|
125
125
|
Example for Google Chrome (in Mac OS X):
|
126
|
-
open -a "Google Chrome"
|
126
|
+
open -a "Google Chrome" tmp/jasmine/runner.html --args --allow-file-access-from-files
|
127
127
|
|
128
128
|
Again, it's the opinion of the present author that this shouldn't be necessary in any situation but legacy rescue of an existing test suite. With respect specifically to HTML fixtures, please consider [jasmine-fixture](https://github.com/searls/jasmine-fixture) and [my rationale](http://searls.testdouble.com/posts/2011-12-11-jasmine-fixtures.html) for it.
|
@@ -6,7 +6,7 @@ src_dir: "app/assets/javascripts"
|
|
6
6
|
# list of file expressions to include as source files
|
7
7
|
# relative path from src_dir
|
8
8
|
src_files:
|
9
|
-
- "application.{js,coffee}"
|
9
|
+
- "application.{js.coffee,js,coffee}"
|
10
10
|
|
11
11
|
# path to parent directory of spec_files
|
12
12
|
# relative path from Rails.root
|
@@ -16,14 +16,14 @@ spec_dir: spec/javascripts
|
|
16
16
|
# list of file expressions to include as helpers into spec runner
|
17
17
|
# relative path from spec_dir
|
18
18
|
helpers:
|
19
|
-
- "helpers/**/*.{js,coffee}"
|
19
|
+
- "helpers/**/*.{js.coffee,js,coffee}"
|
20
20
|
|
21
21
|
# list of file expressions to include as specs into spec runner
|
22
22
|
# relative path from spec_dir
|
23
23
|
spec_files:
|
24
|
-
- "**/*[Ss]pec.{js,coffee}"
|
24
|
+
- "**/*[Ss]pec.{js.coffee,js,coffee}"
|
25
25
|
|
26
26
|
# path to directory of temporary files
|
27
27
|
# (spec runner and asset cache)
|
28
|
-
# defaults to
|
29
|
-
tmp_dir: "
|
28
|
+
# defaults to tmp/jasmine
|
29
|
+
tmp_dir: "tmp/jasmine"
|
data/lib/jasmine-rails.rb
CHANGED
@@ -1,6 +1,7 @@
|
|
1
1
|
require "jasmine_rails/engine"
|
2
2
|
|
3
3
|
module JasmineRails
|
4
|
+
DEFAULT_TMP_DIR = 'tmp/jasmine'
|
4
5
|
class << self
|
5
6
|
# return the relative path to access the spec runner
|
6
7
|
# for the host Rails application
|
@@ -24,7 +25,7 @@ module JasmineRails
|
|
24
25
|
end
|
25
26
|
|
26
27
|
def tmp_dir
|
27
|
-
path = jasmine_config['tmp_dir'] ||
|
28
|
+
path = jasmine_config['tmp_dir'] || JasmineRails::DEFAULT_TMP_DIR
|
28
29
|
Rails.root.join(path)
|
29
30
|
end
|
30
31
|
|
metadata
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: jasmine-rails
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 0.5.
|
4
|
+
version: 0.5.5
|
5
5
|
prerelease:
|
6
6
|
platform: ruby
|
7
7
|
authors:
|
@@ -11,7 +11,7 @@ authors:
|
|
11
11
|
autorequire:
|
12
12
|
bindir: bin
|
13
13
|
cert_chain: []
|
14
|
-
date: 2014-
|
14
|
+
date: 2014-02-02 00:00:00.000000000 Z
|
15
15
|
dependencies:
|
16
16
|
- !ruby/object:Gem::Dependency
|
17
17
|
name: rails
|
@@ -142,7 +142,7 @@ required_ruby_version: !ruby/object:Gem::Requirement
|
|
142
142
|
version: '0'
|
143
143
|
segments:
|
144
144
|
- 0
|
145
|
-
hash: -
|
145
|
+
hash: -3072586661323919607
|
146
146
|
required_rubygems_version: !ruby/object:Gem::Requirement
|
147
147
|
none: false
|
148
148
|
requirements:
|
@@ -151,7 +151,7 @@ required_rubygems_version: !ruby/object:Gem::Requirement
|
|
151
151
|
version: '0'
|
152
152
|
segments:
|
153
153
|
- 0
|
154
|
-
hash: -
|
154
|
+
hash: -3072586661323919607
|
155
155
|
requirements: []
|
156
156
|
rubyforge_project:
|
157
157
|
rubygems_version: 1.8.23
|