magic_lamp 0.9.0

Sign up to get free protection for your applications and to get access to all the features.
Files changed (69) hide show
  1. checksums.yaml +7 -0
  2. data/LICENSE +202 -0
  3. data/README.md +104 -0
  4. data/lib/magic_lamp.rb +50 -0
  5. data/lib/magic_lamp/fixture_creator.rb +53 -0
  6. data/lib/magic_lamp/version.rb +3 -0
  7. data/lib/tasks/magic_lamp_tasks.rb +44 -0
  8. data/spec/dummy/README.rdoc +28 -0
  9. data/spec/dummy/Rakefile +6 -0
  10. data/spec/dummy/app/assets/javascripts/application.js +13 -0
  11. data/spec/dummy/app/assets/stylesheets/application.css +15 -0
  12. data/spec/dummy/app/controllers/application_controller.rb +5 -0
  13. data/spec/dummy/app/controllers/orders_controller.rb +58 -0
  14. data/spec/dummy/app/helpers/application_helper.rb +2 -0
  15. data/spec/dummy/app/helpers/orders_helper.rb +2 -0
  16. data/spec/dummy/app/models/order.rb +2 -0
  17. data/spec/dummy/app/views/layouts/application.html.erb +14 -0
  18. data/spec/dummy/app/views/orders/_form.html.erb +17 -0
  19. data/spec/dummy/app/views/orders/edit.html.erb +6 -0
  20. data/spec/dummy/app/views/orders/foo.html.erb +1 -0
  21. data/spec/dummy/app/views/orders/index.html.erb +23 -0
  22. data/spec/dummy/app/views/orders/new.html.erb +5 -0
  23. data/spec/dummy/app/views/orders/show.html.erb +4 -0
  24. data/spec/dummy/bin/bundle +3 -0
  25. data/spec/dummy/bin/rails +4 -0
  26. data/spec/dummy/bin/rake +4 -0
  27. data/spec/dummy/config.ru +4 -0
  28. data/spec/dummy/config/application.rb +23 -0
  29. data/spec/dummy/config/boot.rb +5 -0
  30. data/spec/dummy/config/database.yml +25 -0
  31. data/spec/dummy/config/environment.rb +5 -0
  32. data/spec/dummy/config/environments/development.rb +37 -0
  33. data/spec/dummy/config/environments/production.rb +83 -0
  34. data/spec/dummy/config/environments/test.rb +39 -0
  35. data/spec/dummy/config/initializers/backtrace_silencers.rb +7 -0
  36. data/spec/dummy/config/initializers/cookies_serializer.rb +3 -0
  37. data/spec/dummy/config/initializers/filter_parameter_logging.rb +4 -0
  38. data/spec/dummy/config/initializers/inflections.rb +16 -0
  39. data/spec/dummy/config/initializers/mime_types.rb +4 -0
  40. data/spec/dummy/config/initializers/session_store.rb +3 -0
  41. data/spec/dummy/config/initializers/wrap_parameters.rb +14 -0
  42. data/spec/dummy/config/locales/en.yml +23 -0
  43. data/spec/dummy/config/routes.rb +58 -0
  44. data/spec/dummy/config/secrets.yml +22 -0
  45. data/spec/dummy/db/migrate/20140623002513_create_orders.rb +8 -0
  46. data/spec/dummy/db/schema.rb +21 -0
  47. data/spec/dummy/db/test.sqlite3 +0 -0
  48. data/spec/dummy/log/development.log +1 -0
  49. data/spec/dummy/log/test.log +17988 -0
  50. data/spec/dummy/public/404.html +67 -0
  51. data/spec/dummy/public/422.html +67 -0
  52. data/spec/dummy/public/500.html +66 -0
  53. data/spec/dummy/public/favicon.ico +0 -0
  54. data/spec/dummy/spec/magic_lamp.rb +4 -0
  55. data/spec/dummy/spec/magic_lamp/foo/foo_lamp.rb +1 -0
  56. data/spec/dummy/spec/magic_lamp/rake/rake_lamp.rb +3 -0
  57. data/spec/dummy/tmp/cache/assets/test/sprockets/13fe41fee1fe35b49d145bcc06610705 +0 -0
  58. data/spec/dummy/tmp/cache/assets/test/sprockets/2f5173deea6c795b8fdde723bb4b63af +0 -0
  59. data/spec/dummy/tmp/cache/assets/test/sprockets/357970feca3ac29060c1e3861e2c0953 +0 -0
  60. data/spec/dummy/tmp/cache/assets/test/sprockets/cffd775d018f68ce5dba1ee0d951a994 +0 -0
  61. data/spec/dummy/tmp/cache/assets/test/sprockets/d771ace226fc8215a3572e0aa35bb0d6 +0 -0
  62. data/spec/dummy/tmp/cache/assets/test/sprockets/f7cbd26ba1d28d48de824f0e94586655 +0 -0
  63. data/spec/integration/integration_spec.rb +21 -0
  64. data/spec/lib/fixture_creator_spec.rb +142 -0
  65. data/spec/lib/magic_lamp_spec.rb +98 -0
  66. data/spec/rails_helper.rb +53 -0
  67. data/spec/spec_helper.rb +78 -0
  68. data/spec/tasks/magic_lamp_tasks_spec.rb +34 -0
  69. metadata +257 -0
checksums.yaml ADDED
@@ -0,0 +1,7 @@
1
+ ---
2
+ SHA1:
3
+ metadata.gz: 0b6f5af7627ea40d33860f5a482bbe73568eccd7
4
+ data.tar.gz: 719bca7fe3bf9ff43b9281bcab340ab067e25610
5
+ SHA512:
6
+ metadata.gz: 864494e38172878be15a56df14285d1f9704c6d7c4cdb7084a963614371ce5f43a06920f7ae11ad6a658cedc4d70574b26b89f6db5463699457aeed403d2d54d
7
+ data.tar.gz: 28e5256c6730b96de2fd74c6ec94114f27878a97366c5b4e98cd011e10ad6e7c3f612c0aa9866c22c5bb4e3c2d82a5983c2ce8e48d4abf53ef2ac3f2764ce554
data/LICENSE ADDED
@@ -0,0 +1,202 @@
1
+
2
+ Apache License
3
+ Version 2.0, January 2004
4
+ http://www.apache.org/licenses/
5
+
6
+ TERMS AND CONDITIONS FOR USE, REPRODUCTION, AND DISTRIBUTION
7
+
8
+ 1. Definitions.
9
+
10
+ "License" shall mean the terms and conditions for use, reproduction,
11
+ and distribution as defined by Sections 1 through 9 of this document.
12
+
13
+ "Licensor" shall mean the copyright owner or entity authorized by
14
+ the copyright owner that is granting the License.
15
+
16
+ "Legal Entity" shall mean the union of the acting entity and all
17
+ other entities that control, are controlled by, or are under common
18
+ control with that entity. For the purposes of this definition,
19
+ "control" means (i) the power, direct or indirect, to cause the
20
+ direction or management of such entity, whether by contract or
21
+ otherwise, or (ii) ownership of fifty percent (50%) or more of the
22
+ outstanding shares, or (iii) beneficial ownership of such entity.
23
+
24
+ "You" (or "Your") shall mean an individual or Legal Entity
25
+ exercising permissions granted by this License.
26
+
27
+ "Source" form shall mean the preferred form for making modifications,
28
+ including but not limited to software source code, documentation
29
+ source, and configuration files.
30
+
31
+ "Object" form shall mean any form resulting from mechanical
32
+ transformation or translation of a Source form, including but
33
+ not limited to compiled object code, generated documentation,
34
+ and conversions to other media types.
35
+
36
+ "Work" shall mean the work of authorship, whether in Source or
37
+ Object form, made available under the License, as indicated by a
38
+ copyright notice that is included in or attached to the work
39
+ (an example is provided in the Appendix below).
40
+
41
+ "Derivative Works" shall mean any work, whether in Source or Object
42
+ form, that is based on (or derived from) the Work and for which the
43
+ editorial revisions, annotations, elaborations, or other modifications
44
+ represent, as a whole, an original work of authorship. For the purposes
45
+ of this License, Derivative Works shall not include works that remain
46
+ separable from, or merely link (or bind by name) to the interfaces of,
47
+ the Work and Derivative Works thereof.
48
+
49
+ "Contribution" shall mean any work of authorship, including
50
+ the original version of the Work and any modifications or additions
51
+ to that Work or Derivative Works thereof, that is intentionally
52
+ submitted to Licensor for inclusion in the Work by the copyright owner
53
+ or by an individual or Legal Entity authorized to submit on behalf of
54
+ the copyright owner. For the purposes of this definition, "submitted"
55
+ means any form of electronic, verbal, or written communication sent
56
+ to the Licensor or its representatives, including but not limited to
57
+ communication on electronic mailing lists, source code control systems,
58
+ and issue tracking systems that are managed by, or on behalf of, the
59
+ Licensor for the purpose of discussing and improving the Work, but
60
+ excluding communication that is conspicuously marked or otherwise
61
+ designated in writing by the copyright owner as "Not a Contribution."
62
+
63
+ "Contributor" shall mean Licensor and any individual or Legal Entity
64
+ on behalf of whom a Contribution has been received by Licensor and
65
+ subsequently incorporated within the Work.
66
+
67
+ 2. Grant of Copyright License. Subject to the terms and conditions of
68
+ this License, each Contributor hereby grants to You a perpetual,
69
+ worldwide, non-exclusive, no-charge, royalty-free, irrevocable
70
+ copyright license to reproduce, prepare Derivative Works of,
71
+ publicly display, publicly perform, sublicense, and distribute the
72
+ Work and such Derivative Works in Source or Object form.
73
+
74
+ 3. Grant of Patent License. Subject to the terms and conditions of
75
+ this License, each Contributor hereby grants to You a perpetual,
76
+ worldwide, non-exclusive, no-charge, royalty-free, irrevocable
77
+ (except as stated in this section) patent license to make, have made,
78
+ use, offer to sell, sell, import, and otherwise transfer the Work,
79
+ where such license applies only to those patent claims licensable
80
+ by such Contributor that are necessarily infringed by their
81
+ Contribution(s) alone or by combination of their Contribution(s)
82
+ with the Work to which such Contribution(s) was submitted. If You
83
+ institute patent litigation against any entity (including a
84
+ cross-claim or counterclaim in a lawsuit) alleging that the Work
85
+ or a Contribution incorporated within the Work constitutes direct
86
+ or contributory patent infringement, then any patent licenses
87
+ granted to You under this License for that Work shall terminate
88
+ as of the date such litigation is filed.
89
+
90
+ 4. Redistribution. You may reproduce and distribute copies of the
91
+ Work or Derivative Works thereof in any medium, with or without
92
+ modifications, and in Source or Object form, provided that You
93
+ meet the following conditions:
94
+
95
+ (a) You must give any other recipients of the Work or
96
+ Derivative Works a copy of this License; and
97
+
98
+ (b) You must cause any modified files to carry prominent notices
99
+ stating that You changed the files; and
100
+
101
+ (c) You must retain, in the Source form of any Derivative Works
102
+ that You distribute, all copyright, patent, trademark, and
103
+ attribution notices from the Source form of the Work,
104
+ excluding those notices that do not pertain to any part of
105
+ the Derivative Works; and
106
+
107
+ (d) If the Work includes a "NOTICE" text file as part of its
108
+ distribution, then any Derivative Works that You distribute must
109
+ include a readable copy of the attribution notices contained
110
+ within such NOTICE file, excluding those notices that do not
111
+ pertain to any part of the Derivative Works, in at least one
112
+ of the following places: within a NOTICE text file distributed
113
+ as part of the Derivative Works; within the Source form or
114
+ documentation, if provided along with the Derivative Works; or,
115
+ within a display generated by the Derivative Works, if and
116
+ wherever such third-party notices normally appear. The contents
117
+ of the NOTICE file are for informational purposes only and
118
+ do not modify the License. You may add Your own attribution
119
+ notices within Derivative Works that You distribute, alongside
120
+ or as an addendum to the NOTICE text from the Work, provided
121
+ that such additional attribution notices cannot be construed
122
+ as modifying the License.
123
+
124
+ You may add Your own copyright statement to Your modifications and
125
+ may provide additional or different license terms and conditions
126
+ for use, reproduction, or distribution of Your modifications, or
127
+ for any such Derivative Works as a whole, provided Your use,
128
+ reproduction, and distribution of the Work otherwise complies with
129
+ the conditions stated in this License.
130
+
131
+ 5. Submission of Contributions. Unless You explicitly state otherwise,
132
+ any Contribution intentionally submitted for inclusion in the Work
133
+ by You to the Licensor shall be under the terms and conditions of
134
+ this License, without any additional terms or conditions.
135
+ Notwithstanding the above, nothing herein shall supersede or modify
136
+ the terms of any separate license agreement you may have executed
137
+ with Licensor regarding such Contributions.
138
+
139
+ 6. Trademarks. This License does not grant permission to use the trade
140
+ names, trademarks, service marks, or product names of the Licensor,
141
+ except as required for reasonable and customary use in describing the
142
+ origin of the Work and reproducing the content of the NOTICE file.
143
+
144
+ 7. Disclaimer of Warranty. Unless required by applicable law or
145
+ agreed to in writing, Licensor provides the Work (and each
146
+ Contributor provides its Contributions) on an "AS IS" BASIS,
147
+ WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or
148
+ implied, including, without limitation, any warranties or conditions
149
+ of TITLE, NON-INFRINGEMENT, MERCHANTABILITY, or FITNESS FOR A
150
+ PARTICULAR PURPOSE. You are solely responsible for determining the
151
+ appropriateness of using or redistributing the Work and assume any
152
+ risks associated with Your exercise of permissions under this License.
153
+
154
+ 8. Limitation of Liability. In no event and under no legal theory,
155
+ whether in tort (including negligence), contract, or otherwise,
156
+ unless required by applicable law (such as deliberate and grossly
157
+ negligent acts) or agreed to in writing, shall any Contributor be
158
+ liable to You for damages, including any direct, indirect, special,
159
+ incidental, or consequential damages of any character arising as a
160
+ result of this License or out of the use or inability to use the
161
+ Work (including but not limited to damages for loss of goodwill,
162
+ work stoppage, computer failure or malfunction, or any and all
163
+ other commercial damages or losses), even if such Contributor
164
+ has been advised of the possibility of such damages.
165
+
166
+ 9. Accepting Warranty or Additional Liability. While redistributing
167
+ the Work or Derivative Works thereof, You may choose to offer,
168
+ and charge a fee for, acceptance of support, warranty, indemnity,
169
+ or other liability obligations and/or rights consistent with this
170
+ License. However, in accepting such obligations, You may act only
171
+ on Your own behalf and on Your sole responsibility, not on behalf
172
+ of any other Contributor, and only if You agree to indemnify,
173
+ defend, and hold each Contributor harmless for any liability
174
+ incurred by, or claims asserted against, such Contributor by reason
175
+ of your accepting any such warranty or additional liability.
176
+
177
+ END OF TERMS AND CONDITIONS
178
+
179
+ APPENDIX: How to apply the Apache License to your work.
180
+
181
+ To apply the Apache License to your work, attach the following
182
+ boilerplate notice, with the fields enclosed by brackets "[]"
183
+ replaced with your own identifying information. (Don't include
184
+ the brackets!) The text should be enclosed in the appropriate
185
+ comment syntax for the file format. We also recommend that a
186
+ file or class name and description of purpose be included on the
187
+ same "printed page" as the copyright notice for easier
188
+ identification within third-party archives.
189
+
190
+ Copyright 2014 Michael Crismali
191
+
192
+ Licensed under the Apache License, Version 2.0 (the "License");
193
+ you may not use this file except in compliance with the License.
194
+ You may obtain a copy of the License at
195
+
196
+ http://www.apache.org/licenses/LICENSE-2.0
197
+
198
+ Unless required by applicable law or agreed to in writing, software
199
+ distributed under the License is distributed on an "AS IS" BASIS,
200
+ WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
201
+ See the License for the specific language governing permissions and
202
+ limitations under the License.
data/README.md ADDED
@@ -0,0 +1,104 @@
1
+ # MagicLamp
2
+
3
+ MagicLamp ensures that if you change some markup in your templates that your JavaScript depends on that
4
+ your tests will break. This is accomplished by generating fixture files from your actual templates just before running your JavaScript specs.
5
+
6
+ ## Installation
7
+
8
+ Add this line to your application's Gemfile:
9
+
10
+ gem "magic_lamp"
11
+
12
+ And then execute:
13
+
14
+ $ bundle
15
+
16
+ Or install it yourself as:
17
+
18
+ $ gem install magic_lamp
19
+ ## Usage
20
+ ### Basic usage
21
+ In any file that ends in `_lamp.rb` in your `spec` or `test` directory:
22
+ ```ruby
23
+ MagicLamp.create_fixture("fixture_name", SomeController) do
24
+
25
+ @instance_variable_your_template_depends_on = true
26
+ # instance variables set in this block will be available to
27
+ # the template you render. You also have access to the usual
28
+ # controller methods and helpers here
29
+ params[:foo] = "some param that's rendered for some reason"
30
+
31
+ render :template_to_be_rendered
32
+ # or
33
+ # render partial: :partial_to_be_rendered
34
+ # or
35
+ # render partial: :foo, collection: [Foo.new, Foo.new, Foo.new]
36
+ # or
37
+ # pretty much anything you can normall do with render
38
+ end
39
+ ```
40
+ Then if you ran:
41
+
42
+ $ rake magic_lamp
43
+ There would be a file called `fixture_name.html` containing the rendered template in `tmp/magic_lamp`.
44
+ A more in depth example can be found below.
45
+
46
+ ### Rake tasks
47
+ The basic tasks are:
48
+ * `rake magic_lamp:create_fixtures` - generates fixtures from `_lamp` files
49
+ * `rake magic_lamp:clean` - deletes fixtures (by removing `tmp/magic_lamp`)
50
+ * `rake magic_lamp` - alias for `rake magic_lamp:create_fixtures`
51
+
52
+ Since you'll probably always want to run the create fixtures task before you run your JavaScript specs, MagicLamp comes with some convenience tasks that create your fixtures and then immediately run your JavaScript specs:
53
+ * `rake magic_lamp:evergreen` - [Evergreen](https://github.com/abepetrillo/evergreen) integration (you'll need `gem "evergreen", require: "evergreen/rails"` for this to work)
54
+ * `rake magic_lamp:jasmine` - [Jasmine Gem](https://github.com/pivotal/jasmine-gem) integration
55
+ * `rake magic_lamp:jasmine_rails` - [JasmineRails](https://github.com/searls/jasmine-rails) integration
56
+ * `rake magic_lamp:konacha` - [Konacha](https://github.com/jfirebaugh/konacha) integration
57
+ * `rake magic_lamp:teaspoon` - [Teaspoon](https://github.com/modeset/teaspoon) integration
58
+
59
+ ### In depth example
60
+ Let"s assume we have `Order` model and `OrdersController` and that we want to test our JavaScript against the `views/orders/index.html.erb` that looks like this:
61
+ ```html
62
+ <ul class="orders">
63
+ <% @orders.each do |order| %>
64
+ <li>
65
+ <%= order_name(order) %>
66
+ </li>
67
+ <% end %>
68
+ </ul>
69
+ ```
70
+ The only dependencies in this template are `@orders` and the `order_name` helper method. So anywhere in `spec` or `test` we make a file that ends in `_lamp.rb` and write:
71
+
72
+ ```ruby
73
+ MagicLamp.create_fixture("orders_index", OrdersController) do
74
+ @orders = [
75
+ Order.new(name: "foo", id: 1),
76
+ Order.new(name: "bar", id: 2),
77
+ Order.new(name: "baz", id: 3)
78
+ ]
79
+ render :index
80
+ end
81
+ ```
82
+ We want our fixture file to be named `orders_index.html`, so we pass in `"orders_index"` as the first argument. We pass in `OrdersController as the second argument because it's the only controller that knows about the `order_name` helper.
83
+
84
+ So after we run `rake magic_lamp` we end up with a `orders_index.html` file in `tmp/magic_lamp` that looks like this:
85
+ ```html
86
+ <ul class="orders">
87
+ <li>
88
+ foo: 1
89
+ </li>
90
+ <li>
91
+ bar: 2
92
+ </li>
93
+ <li>
94
+ baz: 3
95
+ </li>
96
+ </ul>
97
+ ```
98
+ ## Contributing
99
+
100
+ 1. Fork it
101
+ 2. Create your feature branch (`git checkout -b my-new-feature`)
102
+ 3. Commit your changes (`git commit -am 'Add some feature'`)
103
+ 4. Push to the branch (`git push origin my-new-feature`)
104
+ 5. Create new Pull Request
data/lib/magic_lamp.rb ADDED
@@ -0,0 +1,50 @@
1
+ module MagicLamp
2
+ LAMP = "_lamp"
3
+ MAGIC_LAMP = "magic#{LAMP}"
4
+ SPEC = "spec"
5
+ STARS = "**"
6
+ TEST = "test"
7
+ TMP = "tmp"
8
+ TMP_PATH = [TMP, MAGIC_LAMP]
9
+
10
+ class << self
11
+ def path
12
+ Rails.root.join(directory_path)
13
+ end
14
+
15
+ def create_fixture(fixture_name, controller_class, &block)
16
+ FixtureCreator.new.create_fixture(fixture_name, controller_class, &block)
17
+ end
18
+
19
+ def load_lamp_files
20
+ create_tmp_directory
21
+ require_all(Dir[path.join(STARS, "*#{LAMP}.rb")])
22
+ end
23
+
24
+ def tmp_path
25
+ Rails.root.join(*TMP_PATH)
26
+ end
27
+
28
+ def create_tmp_directory
29
+ FileUtils.mkdir_p(tmp_path)
30
+ end
31
+
32
+ def remove_tmp_directory
33
+ FileUtils.rm_rf(tmp_path)
34
+ end
35
+
36
+ private
37
+
38
+ def directory_path
39
+ Dir.exist?(Rails.root.join(SPEC)) ? SPEC : TEST
40
+ end
41
+
42
+ def require_all(files)
43
+ files.each { |file| require file }
44
+ end
45
+ end
46
+ end
47
+
48
+ require "fileutils"
49
+ require "magic_lamp/fixture_creator"
50
+ require "tasks/magic_lamp_tasks"
@@ -0,0 +1,53 @@
1
+ module MagicLamp
2
+ class FixtureCreator
3
+ attr_accessor :render_arguments, :namespace
4
+
5
+ def initialize
6
+ self.namespace = MagicLamp
7
+ end
8
+
9
+ def create_fixture(fixture_name, controller_class, &block)
10
+ controller = new_controller(controller_class, &block)
11
+ munged_arguments = munge_arguments(render_arguments)
12
+ template = controller.render_to_string(*munged_arguments)
13
+
14
+ File.open(fixture_path(fixture_name), "w") do |file|
15
+ file.write(template)
16
+ end
17
+ end
18
+
19
+ def new_controller(controller_class, &block)
20
+ controller = controller_class.new
21
+ controller.request = ActionDispatch::TestRequest.new
22
+ redefine_render(controller)
23
+ controller.instance_eval(&block)
24
+ controller
25
+ end
26
+
27
+ def munge_arguments(arguments)
28
+ first_arg, second_arg = arguments
29
+
30
+ if first_arg.is_a?(Hash)
31
+ first_arg[:layout] ||= false
32
+ elsif second_arg.is_a?(Hash)
33
+ second_arg[:layout] ||= false
34
+ else
35
+ arguments << { layout: false }
36
+ end
37
+ arguments
38
+ end
39
+
40
+ private
41
+
42
+ def redefine_render(controller)
43
+ fixture_creator = self
44
+ controller.singleton_class.send(:define_method, :render) do |*args|
45
+ fixture_creator.render_arguments = args
46
+ end
47
+ end
48
+
49
+ def fixture_path(fixture_name)
50
+ namespace.tmp_path.join("#{fixture_name}.html")
51
+ end
52
+ end
53
+ end
@@ -0,0 +1,3 @@
1
+ module MagicLamp
2
+ VERSION = "0.9.0"
3
+ end
@@ -0,0 +1,44 @@
1
+ require "rake"
2
+
3
+ namespace :magic_lamp do
4
+ desc "Remove MagicLamp fixtures"
5
+ task clean: :environment do
6
+ MagicLamp.remove_tmp_directory
7
+ end
8
+
9
+ desc "Creates fixtures from MagicLamp files"
10
+ task create_fixtures: :clean do
11
+ MagicLamp.load_lamp_files
12
+ end
13
+
14
+ # Test runner integration tasks
15
+
16
+ desc "Create fixtures and run Teaspoon specs"
17
+ task teaspoon: :create_fixtures do
18
+ Rake::Task["teaspoon"].invoke
19
+ end
20
+
21
+ desc "Create fixtures and run Jasmine Rails specs"
22
+ task jasmine_rails: :create_fixtures do
23
+ Rake::Task["spec:javascript"].invoke
24
+ end
25
+
26
+ desc "Create fixtures and run Jasmine specs"
27
+ task jasmine: :create_fixtures do
28
+ Rake::Task["jasmine:ci"].invoke
29
+ end
30
+
31
+ desc "Create fixtures and run Evergreen specs"
32
+ task evergreen: :create_fixtures do
33
+ Rake::Task["spec:javascripts"].invoke
34
+ end
35
+
36
+ desc "Create fixtures and run Konacha specs"
37
+ task konacha: :create_fixtures do
38
+ Rake::Task["konacha:run"].invoke
39
+ end
40
+ end
41
+
42
+ # Alias for magic_lamp:create_fixtures
43
+ desc "Creates fixtures from MagicLamp files"
44
+ task magic_lamp: "magic_lamp:create_fixtures"