rspec-rails 2.13.1 → 2.13.2

Sign up to get free protection for your applications and to get access to all the features.
Files changed (103) hide show
  1. checksums.yaml +4 -4
  2. data/Changelog.md +12 -1
  3. data/README.md +1 -1
  4. data/lib/generators/rspec.rb +1 -2
  5. data/lib/generators/rspec/install/install_generator.rb +0 -2
  6. data/lib/generators/rspec/install/templates/spec/spec_helper.rb.tt +1 -1
  7. data/lib/generators/rspec/scaffold/templates/controller_spec.rb +1 -1
  8. data/lib/rspec/rails.rb +1 -1
  9. data/lib/rspec/rails/example/controller_example_group.rb +4 -2
  10. data/lib/rspec/rails/example/rails_example_group.rb +1 -2
  11. data/lib/rspec/rails/example/view_example_group.rb +1 -1
  12. data/lib/rspec/rails/fixture_support.rb +1 -1
  13. data/lib/rspec/rails/version.rb +1 -1
  14. metadata +5 -182
  15. data/features/Autotest.md +0 -24
  16. data/features/Generators.md +0 -8
  17. data/features/GettingStarted.md +0 -84
  18. data/features/README.md +0 -56
  19. data/features/RailsVersions.md +0 -4
  20. data/features/Transactions.md +0 -84
  21. data/features/Upgrade.md +0 -121
  22. data/features/controller_specs/Cookies.md +0 -57
  23. data/features/controller_specs/README.md +0 -45
  24. data/features/controller_specs/anonymous_controller.feature +0 -378
  25. data/features/controller_specs/bypass_rescue.feature +0 -75
  26. data/features/controller_specs/controller_spec.feature +0 -35
  27. data/features/controller_specs/engine_routes.feature +0 -51
  28. data/features/controller_specs/isolation_from_views.feature +0 -87
  29. data/features/controller_specs/render_views.feature +0 -114
  30. data/features/feature_specs/feature_spec.feature +0 -34
  31. data/features/helper_specs/helper_spec.feature +0 -122
  32. data/features/mailer_specs/url_helpers.feature +0 -38
  33. data/features/matchers/README.md +0 -18
  34. data/features/matchers/new_record_matcher.feature +0 -41
  35. data/features/matchers/redirect_to_matcher.feature +0 -40
  36. data/features/matchers/relation_match_array.feature +0 -22
  37. data/features/matchers/render_template_matcher.feature +0 -49
  38. data/features/mocks/mock_model.feature +0 -147
  39. data/features/mocks/stub_model.feature +0 -58
  40. data/features/model_specs/README.md +0 -21
  41. data/features/model_specs/errors_on.feature +0 -51
  42. data/features/model_specs/transactional_examples.feature +0 -109
  43. data/features/request_specs/request_spec.feature +0 -49
  44. data/features/routing_specs/README.md +0 -16
  45. data/features/routing_specs/be_routable_matcher.feature +0 -80
  46. data/features/routing_specs/engine_routes.feature +0 -38
  47. data/features/routing_specs/named_routes.feature +0 -18
  48. data/features/routing_specs/route_to_matcher.feature +0 -90
  49. data/features/step_definitions/additional_cli_steps.rb +0 -4
  50. data/features/step_definitions/model_steps.rb +0 -3
  51. data/features/support/env.rb +0 -53
  52. data/features/support/rails_versions.rb +0 -4
  53. data/features/view_specs/inferred_controller_path.feature +0 -45
  54. data/features/view_specs/stub_template.feature +0 -51
  55. data/features/view_specs/view_spec.feature +0 -206
  56. data/lib/rspec/rails/rails_version.rb +0 -17
  57. data/spec/autotest/rails_rspec2_spec.rb +0 -36
  58. data/spec/generators/rspec/controller/controller_generator_spec.rb +0 -97
  59. data/spec/generators/rspec/helper/helper_generator_spec.rb +0 -30
  60. data/spec/generators/rspec/install/install_generator_spec.rb +0 -30
  61. data/spec/generators/rspec/integration/integration_generator_spec.rb +0 -44
  62. data/spec/generators/rspec/mailer/mailer_generator_spec.rb +0 -48
  63. data/spec/generators/rspec/model/model_generator_spec.rb +0 -52
  64. data/spec/generators/rspec/observer/observer_generator_spec.rb +0 -21
  65. data/spec/generators/rspec/scaffold/scaffold_generator_spec.rb +0 -138
  66. data/spec/generators/rspec/view/view_generator_spec.rb +0 -41
  67. data/spec/rspec/rails/assertion_adapter_spec.rb +0 -28
  68. data/spec/rspec/rails/assertion_delegator_spec.rb +0 -43
  69. data/spec/rspec/rails/configuration_spec.rb +0 -26
  70. data/spec/rspec/rails/deprecations_spec.rb +0 -18
  71. data/spec/rspec/rails/example/controller_example_group_spec.rb +0 -100
  72. data/spec/rspec/rails/example/feature_example_group_spec.rb +0 -56
  73. data/spec/rspec/rails/example/helper_example_group_spec.rb +0 -64
  74. data/spec/rspec/rails/example/mailer_example_group_spec.rb +0 -21
  75. data/spec/rspec/rails/example/model_example_group_spec.rb +0 -15
  76. data/spec/rspec/rails/example/request_example_group_spec.rb +0 -17
  77. data/spec/rspec/rails/example/routing_example_group_spec.rb +0 -32
  78. data/spec/rspec/rails/example/view_example_group_spec.rb +0 -220
  79. data/spec/rspec/rails/extensions/active_model/errors_on_spec.rb +0 -23
  80. data/spec/rspec/rails/extensions/active_record/base_spec.rb +0 -42
  81. data/spec/rspec/rails/extensions/active_record/records_spec.rb +0 -9
  82. data/spec/rspec/rails/fixture_support_spec.rb +0 -17
  83. data/spec/rspec/rails/matchers/be_a_new_spec.rb +0 -142
  84. data/spec/rspec/rails/matchers/be_new_record_spec.rb +0 -33
  85. data/spec/rspec/rails/matchers/be_routable_spec.rb +0 -41
  86. data/spec/rspec/rails/matchers/be_valid_spec.rb +0 -44
  87. data/spec/rspec/rails/matchers/errors_on_spec.rb +0 -38
  88. data/spec/rspec/rails/matchers/has_spec.rb +0 -29
  89. data/spec/rspec/rails/matchers/have_rendered_spec.rb +0 -93
  90. data/spec/rspec/rails/matchers/redirect_to_spec.rb +0 -80
  91. data/spec/rspec/rails/matchers/relation_match_array_spec.rb +0 -31
  92. data/spec/rspec/rails/matchers/route_to_spec.rb +0 -151
  93. data/spec/rspec/rails/minitest_lifecycle_adapter_spec.rb +0 -22
  94. data/spec/rspec/rails/mocks/mock_model_spec.rb +0 -379
  95. data/spec/rspec/rails/mocks/stub_model_spec.rb +0 -154
  96. data/spec/rspec/rails/rails_version_spec.rb +0 -29
  97. data/spec/rspec/rails/setup_and_teardown_adapter_spec.rb +0 -32
  98. data/spec/rspec/rails/view_rendering_spec.rb +0 -111
  99. data/spec/spec_helper.rb +0 -31
  100. data/spec/support/ar_classes.rb +0 -42
  101. data/spec/support/helpers.rb +0 -20
  102. data/spec/support/matchers.rb +0 -9
  103. data/spec/support/null_object.rb +0 -6
checksums.yaml CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA1:
3
- metadata.gz: b2867278a722c089dbb2bd8f6063ecb479760f05
4
- data.tar.gz: bb564009cc97a8fb65e1088e71d3c0d0538bebd3
3
+ metadata.gz: bde9d78133ed3ae52ae2a3d1899ac9e698da737f
4
+ data.tar.gz: b3112c615d1bd84ebc99f76d72ff063a7a57910b
5
5
  SHA512:
6
- metadata.gz: e030efde0376019bc0f8397c361c73aebf1ce81ba9e62412ef702c56e74c1f3145a43feb7b41e9dcc482e2cd1bd8c1b831c7620348c83bae9e844dffda224fd4
7
- data.tar.gz: 8397abcbfdf655a2c8c9daa3891b03e4a4cf38ff1f60b6106cdf8b7240d29ff496883360ea16ee4c74a48fb61f89599b1cad36157402d33a7380c7a6bb304f5e
6
+ metadata.gz: a20ea10e0d036f6fc3a14a4689c1c140c87256b4386890fad04f6acaa77bb258b6846a6420e8f9b224b38cf197560467461799781fc1e9ec4e4c0cd3061f1613
7
+ data.tar.gz: 97fb4eb068173b5b2f7710ea395595b57a547ff3520f7f29bce52d4bec1b3db19fa65835f829fc56704b5319502b4fb51942dc807758176345c0197cd0bf0b24
@@ -1,4 +1,15 @@
1
- ### 2.13.1
1
+ ### 2.13.2 / 2013-05-18
2
+ [full changelog](http://github.com/rspec/rspec-rails/compare/v2.13.1...v2.13.2)
3
+
4
+ Bug fixes
5
+
6
+ * `let` definitions may override methods defined in modules brought in via
7
+ `config.include` in controller specs. Fixes regression introduced in 2.13.
8
+ (Andy Lindeman, Jon Rowe)
9
+ * Code that checks Rails version numbers is more robust in cases where Rails is
10
+ not fully loaded. (Andy Lindeman)
11
+
12
+ ### 2.13.1 / 2013-04-27
2
13
  [full changelog](http://github.com/rspec/rspec-rails/compare/v2.13.0...v2.13.1)
3
14
 
4
15
  Bug fixes
data/README.md CHANGED
@@ -121,7 +121,7 @@ spec](#feature-specs).
121
121
 
122
122
  ## <a id="request-spec"></a>Request Specs
123
123
 
124
- Request specs live in spec/requests, spec/features, spec/api and
124
+ Request specs live in spec/requests, spec/api and
125
125
  spec/integration, and mix in behavior
126
126
  [ActionDispatch::Integration::Runner](http://api.rubyonrails.org/classes/ActionDispatch/Integration/Runner.html),
127
127
  which is the basis for [Rails' integration
@@ -1,5 +1,4 @@
1
1
  require 'rails/generators/named_base'
2
- require 'rspec/rails/rails_version'
3
2
 
4
3
  module Rspec
5
4
  module Generators
@@ -8,7 +7,7 @@ module Rspec
8
7
  @_rspec_source_root ||= File.expand_path(File.join(File.dirname(__FILE__), 'rspec', generator_name, 'templates'))
9
8
  end
10
9
 
11
- if RSpec::Rails.rails_version_satisfied_by?('< 3.1')
10
+ if ::Rails::VERSION::STRING < '3.1'
12
11
  def module_namespacing
13
12
  yield if block_given?
14
13
  end
@@ -1,5 +1,3 @@
1
- require 'rspec/rails/rails_version'
2
-
3
1
  module Rspec
4
2
  module Generators
5
3
  class InstallGenerator < ::Rails::Generators::Base
@@ -8,7 +8,7 @@ require 'rspec/autorun'
8
8
  # in spec/support/ and its subdirectories.
9
9
  Dir[Rails.root.join("spec/support/**/*.rb")].each { |f| require f }
10
10
 
11
- <% if RSpec::Rails.rails_version_satisfied_by?('>= 4.0.0.beta1') -%>
11
+ <% if ::Rails::VERSION::STRING >= '4' -%>
12
12
  # Checks for pending migrations before tests are run.
13
13
  # If you are not using ActiveRecord, you can remove this line.
14
14
  ActiveRecord::Migration.check_pending! if defined?(ActiveRecord::Migration)
@@ -109,7 +109,7 @@ describe <%= controller_class_name %>Controller do
109
109
  # specifies that the <%= class_name %> created on the previous line
110
110
  # receives the :update_attributes message with whatever params are
111
111
  # submitted in the request.
112
- <%- if RSpec::Rails.rails_version_satisfied_by?('>= 4.0.0.beta1') -%>
112
+ <%- if ::Rails::VERSION::STRING >= '4' -%>
113
113
  <%= class_name %>.any_instance.should_receive(:update).with(<%= formatted_hash(example_params_for_update) %>)
114
114
  <%- else -%>
115
115
  <%= class_name %>.any_instance.should_receive(:update_attributes).with(<%= formatted_hash(example_params_for_update) %>)
@@ -5,7 +5,7 @@ RSpec::configure do |c|
5
5
  c.backtrace_clean_patterns << /lib\/rspec\/rails/
6
6
  end
7
7
 
8
- require 'rspec/rails/rails_version'
8
+ require 'rails/version'
9
9
  require 'rspec/rails/extensions'
10
10
  require 'rspec/rails/view_rendering'
11
11
  require 'rspec/rails/adapters'
@@ -142,9 +142,11 @@ module RSpec::Rails
142
142
  end
143
143
  end
144
144
 
145
- included do
146
- subject { controller }
145
+ def subject
146
+ controller
147
+ end
147
148
 
149
+ included do
148
150
  metadata[:type] = :controller
149
151
 
150
152
  before do
@@ -1,14 +1,13 @@
1
1
  # Temporary workaround to resolve circular dependency between rspec-rails' spec
2
2
  # suite and ammeter.
3
3
  require 'rspec/rails/matchers'
4
- require 'rspec/rails/rails_version'
5
4
 
6
5
  module RSpec
7
6
  module Rails
8
7
  module RailsExampleGroup
9
8
  extend ActiveSupport::Concern
10
9
  include RSpec::Rails::SetupAndTeardownAdapter
11
- include RSpec::Rails::MiniTestLifecycleAdapter if RSpec::Rails.rails_version_satisfied_by?('>= 4.0.0.beta1')
10
+ include RSpec::Rails::MiniTestLifecycleAdapter if ::Rails::VERSION::STRING >= '4'
12
11
  include RSpec::Rails::TestUnitAssertionAdapter
13
12
  include RSpec::Rails::Matchers
14
13
  end
@@ -107,7 +107,7 @@ module RSpec::Rails
107
107
  end
108
108
 
109
109
  def _default_render_options
110
- if RSpec::Rails.rails_version_satisfied_by?('>= 3.2')
110
+ if ::Rails::VERSION::STRING >= '3.2'
111
111
  # pluck the handler, format, and locale out of, eg, posts/index.de.html.haml
112
112
  template, *components = _default_file_to_render.split('.')
113
113
  handler, format, locale = *components.reverse
@@ -4,7 +4,7 @@ module RSpec
4
4
  module FixtureSupport
5
5
  extend ActiveSupport::Concern
6
6
  include RSpec::Rails::SetupAndTeardownAdapter
7
- include RSpec::Rails::MiniTestLifecycleAdapter if RSpec::Rails.rails_version_satisfied_by?('>= 4.0.0.beta1')
7
+ include RSpec::Rails::MiniTestLifecycleAdapter if ::Rails::VERSION::STRING > '4'
8
8
  include RSpec::Rails::TestUnitAssertionAdapter
9
9
  include ActiveRecord::TestFixtures
10
10
 
@@ -1,7 +1,7 @@
1
1
  module RSpec
2
2
  module Rails
3
3
  module Version
4
- STRING = '2.13.1'
4
+ STRING = '2.13.2'
5
5
  end
6
6
  end
7
7
  end
metadata CHANGED
@@ -1,14 +1,14 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: rspec-rails
3
3
  version: !ruby/object:Gem::Version
4
- version: 2.13.1
4
+ version: 2.13.2
5
5
  platform: ruby
6
6
  authors:
7
7
  - David Chelimsky
8
8
  autorequire:
9
9
  bindir: bin
10
10
  cert_chain: []
11
- date: 2013-04-27 00:00:00.000000000 Z
11
+ date: 2013-05-19 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: activesupport
@@ -241,7 +241,6 @@ files:
241
241
  - lib/rspec/rails/matchers/routing_matchers.rb
242
242
  - lib/rspec/rails/mocks.rb
243
243
  - lib/rspec/rails/module_inclusion.rb
244
- - lib/rspec/rails/rails_version.rb
245
244
  - lib/rspec/rails/tasks/rspec.rake
246
245
  - lib/rspec/rails/vendor/capybara.rb
247
246
  - lib/rspec/rails/vendor/webrat.rb
@@ -254,94 +253,6 @@ files:
254
253
  - Capybara.md
255
254
  - .yardopts
256
255
  - .document
257
- - features/Autotest.md
258
- - features/Generators.md
259
- - features/GettingStarted.md
260
- - features/README.md
261
- - features/RailsVersions.md
262
- - features/Transactions.md
263
- - features/Upgrade.md
264
- - features/controller_specs/Cookies.md
265
- - features/controller_specs/README.md
266
- - features/controller_specs/anonymous_controller.feature
267
- - features/controller_specs/bypass_rescue.feature
268
- - features/controller_specs/controller_spec.feature
269
- - features/controller_specs/engine_routes.feature
270
- - features/controller_specs/isolation_from_views.feature
271
- - features/controller_specs/render_views.feature
272
- - features/feature_specs/feature_spec.feature
273
- - features/helper_specs/helper_spec.feature
274
- - features/mailer_specs/url_helpers.feature
275
- - features/matchers/README.md
276
- - features/matchers/new_record_matcher.feature
277
- - features/matchers/redirect_to_matcher.feature
278
- - features/matchers/relation_match_array.feature
279
- - features/matchers/render_template_matcher.feature
280
- - features/mocks/mock_model.feature
281
- - features/mocks/stub_model.feature
282
- - features/model_specs/README.md
283
- - features/model_specs/errors_on.feature
284
- - features/model_specs/transactional_examples.feature
285
- - features/request_specs/request_spec.feature
286
- - features/routing_specs/README.md
287
- - features/routing_specs/be_routable_matcher.feature
288
- - features/routing_specs/engine_routes.feature
289
- - features/routing_specs/named_routes.feature
290
- - features/routing_specs/route_to_matcher.feature
291
- - features/step_definitions/additional_cli_steps.rb
292
- - features/step_definitions/model_steps.rb
293
- - features/support/env.rb
294
- - features/support/rails_versions.rb
295
- - features/view_specs/inferred_controller_path.feature
296
- - features/view_specs/stub_template.feature
297
- - features/view_specs/view_spec.feature
298
- - spec/autotest/rails_rspec2_spec.rb
299
- - spec/generators/rspec/controller/controller_generator_spec.rb
300
- - spec/generators/rspec/helper/helper_generator_spec.rb
301
- - spec/generators/rspec/install/install_generator_spec.rb
302
- - spec/generators/rspec/integration/integration_generator_spec.rb
303
- - spec/generators/rspec/mailer/mailer_generator_spec.rb
304
- - spec/generators/rspec/model/model_generator_spec.rb
305
- - spec/generators/rspec/observer/observer_generator_spec.rb
306
- - spec/generators/rspec/scaffold/scaffold_generator_spec.rb
307
- - spec/generators/rspec/view/view_generator_spec.rb
308
- - spec/rspec/rails/assertion_adapter_spec.rb
309
- - spec/rspec/rails/assertion_delegator_spec.rb
310
- - spec/rspec/rails/configuration_spec.rb
311
- - spec/rspec/rails/deprecations_spec.rb
312
- - spec/rspec/rails/example/controller_example_group_spec.rb
313
- - spec/rspec/rails/example/feature_example_group_spec.rb
314
- - spec/rspec/rails/example/helper_example_group_spec.rb
315
- - spec/rspec/rails/example/mailer_example_group_spec.rb
316
- - spec/rspec/rails/example/model_example_group_spec.rb
317
- - spec/rspec/rails/example/request_example_group_spec.rb
318
- - spec/rspec/rails/example/routing_example_group_spec.rb
319
- - spec/rspec/rails/example/view_example_group_spec.rb
320
- - spec/rspec/rails/extensions/active_model/errors_on_spec.rb
321
- - spec/rspec/rails/extensions/active_record/base_spec.rb
322
- - spec/rspec/rails/extensions/active_record/records_spec.rb
323
- - spec/rspec/rails/fixture_support_spec.rb
324
- - spec/rspec/rails/matchers/be_a_new_spec.rb
325
- - spec/rspec/rails/matchers/be_new_record_spec.rb
326
- - spec/rspec/rails/matchers/be_routable_spec.rb
327
- - spec/rspec/rails/matchers/be_valid_spec.rb
328
- - spec/rspec/rails/matchers/errors_on_spec.rb
329
- - spec/rspec/rails/matchers/has_spec.rb
330
- - spec/rspec/rails/matchers/have_rendered_spec.rb
331
- - spec/rspec/rails/matchers/redirect_to_spec.rb
332
- - spec/rspec/rails/matchers/relation_match_array_spec.rb
333
- - spec/rspec/rails/matchers/route_to_spec.rb
334
- - spec/rspec/rails/minitest_lifecycle_adapter_spec.rb
335
- - spec/rspec/rails/mocks/mock_model_spec.rb
336
- - spec/rspec/rails/mocks/stub_model_spec.rb
337
- - spec/rspec/rails/rails_version_spec.rb
338
- - spec/rspec/rails/setup_and_teardown_adapter_spec.rb
339
- - spec/rspec/rails/view_rendering_spec.rb
340
- - spec/spec_helper.rb
341
- - spec/support/ar_classes.rb
342
- - spec/support/helpers.rb
343
- - spec/support/matchers.rb
344
- - spec/support/null_object.rb
345
256
  homepage: http://github.com/rspec/rspec-rails
346
257
  licenses:
347
258
  - MIT
@@ -363,97 +274,9 @@ required_rubygems_version: !ruby/object:Gem::Requirement
363
274
  version: '0'
364
275
  requirements: []
365
276
  rubyforge_project: rspec
366
- rubygems_version: 2.0.2
277
+ rubygems_version: 2.0.3
367
278
  signing_key:
368
279
  specification_version: 4
369
- summary: rspec-rails-2.13.1
370
- test_files:
371
- - features/Autotest.md
372
- - features/Generators.md
373
- - features/GettingStarted.md
374
- - features/README.md
375
- - features/RailsVersions.md
376
- - features/Transactions.md
377
- - features/Upgrade.md
378
- - features/controller_specs/Cookies.md
379
- - features/controller_specs/README.md
380
- - features/controller_specs/anonymous_controller.feature
381
- - features/controller_specs/bypass_rescue.feature
382
- - features/controller_specs/controller_spec.feature
383
- - features/controller_specs/engine_routes.feature
384
- - features/controller_specs/isolation_from_views.feature
385
- - features/controller_specs/render_views.feature
386
- - features/feature_specs/feature_spec.feature
387
- - features/helper_specs/helper_spec.feature
388
- - features/mailer_specs/url_helpers.feature
389
- - features/matchers/README.md
390
- - features/matchers/new_record_matcher.feature
391
- - features/matchers/redirect_to_matcher.feature
392
- - features/matchers/relation_match_array.feature
393
- - features/matchers/render_template_matcher.feature
394
- - features/mocks/mock_model.feature
395
- - features/mocks/stub_model.feature
396
- - features/model_specs/README.md
397
- - features/model_specs/errors_on.feature
398
- - features/model_specs/transactional_examples.feature
399
- - features/request_specs/request_spec.feature
400
- - features/routing_specs/README.md
401
- - features/routing_specs/be_routable_matcher.feature
402
- - features/routing_specs/engine_routes.feature
403
- - features/routing_specs/named_routes.feature
404
- - features/routing_specs/route_to_matcher.feature
405
- - features/step_definitions/additional_cli_steps.rb
406
- - features/step_definitions/model_steps.rb
407
- - features/support/env.rb
408
- - features/support/rails_versions.rb
409
- - features/view_specs/inferred_controller_path.feature
410
- - features/view_specs/stub_template.feature
411
- - features/view_specs/view_spec.feature
412
- - spec/autotest/rails_rspec2_spec.rb
413
- - spec/generators/rspec/controller/controller_generator_spec.rb
414
- - spec/generators/rspec/helper/helper_generator_spec.rb
415
- - spec/generators/rspec/install/install_generator_spec.rb
416
- - spec/generators/rspec/integration/integration_generator_spec.rb
417
- - spec/generators/rspec/mailer/mailer_generator_spec.rb
418
- - spec/generators/rspec/model/model_generator_spec.rb
419
- - spec/generators/rspec/observer/observer_generator_spec.rb
420
- - spec/generators/rspec/scaffold/scaffold_generator_spec.rb
421
- - spec/generators/rspec/view/view_generator_spec.rb
422
- - spec/rspec/rails/assertion_adapter_spec.rb
423
- - spec/rspec/rails/assertion_delegator_spec.rb
424
- - spec/rspec/rails/configuration_spec.rb
425
- - spec/rspec/rails/deprecations_spec.rb
426
- - spec/rspec/rails/example/controller_example_group_spec.rb
427
- - spec/rspec/rails/example/feature_example_group_spec.rb
428
- - spec/rspec/rails/example/helper_example_group_spec.rb
429
- - spec/rspec/rails/example/mailer_example_group_spec.rb
430
- - spec/rspec/rails/example/model_example_group_spec.rb
431
- - spec/rspec/rails/example/request_example_group_spec.rb
432
- - spec/rspec/rails/example/routing_example_group_spec.rb
433
- - spec/rspec/rails/example/view_example_group_spec.rb
434
- - spec/rspec/rails/extensions/active_model/errors_on_spec.rb
435
- - spec/rspec/rails/extensions/active_record/base_spec.rb
436
- - spec/rspec/rails/extensions/active_record/records_spec.rb
437
- - spec/rspec/rails/fixture_support_spec.rb
438
- - spec/rspec/rails/matchers/be_a_new_spec.rb
439
- - spec/rspec/rails/matchers/be_new_record_spec.rb
440
- - spec/rspec/rails/matchers/be_routable_spec.rb
441
- - spec/rspec/rails/matchers/be_valid_spec.rb
442
- - spec/rspec/rails/matchers/errors_on_spec.rb
443
- - spec/rspec/rails/matchers/has_spec.rb
444
- - spec/rspec/rails/matchers/have_rendered_spec.rb
445
- - spec/rspec/rails/matchers/redirect_to_spec.rb
446
- - spec/rspec/rails/matchers/relation_match_array_spec.rb
447
- - spec/rspec/rails/matchers/route_to_spec.rb
448
- - spec/rspec/rails/minitest_lifecycle_adapter_spec.rb
449
- - spec/rspec/rails/mocks/mock_model_spec.rb
450
- - spec/rspec/rails/mocks/stub_model_spec.rb
451
- - spec/rspec/rails/rails_version_spec.rb
452
- - spec/rspec/rails/setup_and_teardown_adapter_spec.rb
453
- - spec/rspec/rails/view_rendering_spec.rb
454
- - spec/spec_helper.rb
455
- - spec/support/ar_classes.rb
456
- - spec/support/helpers.rb
457
- - spec/support/matchers.rb
458
- - spec/support/null_object.rb
280
+ summary: rspec-rails-2.13.2
281
+ test_files: []
459
282
  has_rdoc:
@@ -1,24 +0,0 @@
1
- The `rspec:install` generator creates a `.rspec` file, which tells RSpec to
2
- tell Autotest that you're using RSpec. You'll also need to add the ZenTest and
3
- autotest-rails gems to your Gemfile:
4
-
5
- gem "ZenTest", "~> 4.4.2"
6
- gem "autotest-rails", "~> 4.1.0"
7
-
8
- If all of the gems in your Gemfile are installed in system gems, you can just
9
- type
10
-
11
- autotest
12
-
13
- If Bundler is managing any gems for you directly (i.e. you've got `:git` or
14
- `:path` attributes in the Gemfile), however, you may need to run
15
-
16
- bundle exec autotest
17
-
18
- If you do, you require Autotest's bundler plugin in a `.autotest` file in the
19
- project root directory or your home directory:
20
-
21
- require "autotest/bundler"
22
-
23
- Now you can just type `autotest`, it should prefix the generated shell command
24
- with `bundle exec`.
@@ -1,8 +0,0 @@
1
- If you type script/rails generate, the only RSpec generator you'll actually see
2
- is rspec:install. That's because RSpec is registered with Rails as the test
3
- framework, so whenever you generate application components like models,
4
- controllers, etc, RSpec specs are generated instead of Test::Unit tests.
5
-
6
- Note that the generators are there to help you get started, but they are no
7
- substitute for writing your own examples, and they are only guaranteed to work
8
- out of the box for with Rails' defaults (ActiveRecord, no Capybara or Webrat).
@@ -1,84 +0,0 @@
1
- Install Rails-3
2
-
3
- $ gem install rails -v "~> 3.0.0"
4
-
5
- ### Generate an app
6
-
7
- $ rails new example
8
- $ cd example
9
-
10
- ### Add rspec-rails to the Gemfile
11
-
12
- $ echo 'gem "rspec-rails", :group => [:development, :test]' >> Gemfile
13
-
14
- ### Install the bundle
15
-
16
- $ bundle install
17
-
18
- ### Bootstrap RSpec
19
-
20
- $ rails generate rspec:install
21
-
22
- ### Generate a scaffold
23
-
24
- $ rails generate scaffold Widgets name:string
25
-
26
- This generates files in the `app` and `spec` directories. The files in the
27
- `app` directory are generated by Rails, and Rails delegates the generation of
28
- the files in the `spec` directory to RSpec.
29
-
30
- ### Run migrations
31
-
32
- $ rake db:migrate && rake db:test:prepare
33
-
34
- ### Run RSpec
35
-
36
- $ rake spec
37
-
38
- or
39
-
40
- $ rspec spec --format documentation
41
-
42
- If all went well, you should see output ending with:
43
-
44
- 29 examples, 0 failures, 2 pending
45
-
46
- This output also includes the following controller spec:
47
-
48
- WidgetsController
49
- GET index
50
- assigns all widgets as @widgets
51
- GET show
52
- assigns the requested widget as @widget
53
- GET new
54
- assigns a new widget as @widget
55
- GET edit
56
- assigns the requested widget as @widget
57
- POST create
58
- with valid params
59
- creates a new Widget
60
- assigns a newly created widget as @widget
61
- redirects to the created widget
62
- with invalid params
63
- assigns a newly created but unsaved widget as @widget
64
- re-renders the 'new' template
65
- PUT update
66
- with valid params
67
- updates the requested widget
68
- assigns the requested widget as @widget
69
- redirects to the widget
70
- with invalid params
71
- assigns the widget as @widget
72
- re-renders the 'edit' template
73
- DELETE destroy
74
- destroys the requested widget
75
- redirects to the widgets list
76
-
77
- Output like this can help to quickly gain a high level understanding of how an
78
- object behaves. It also exposes which cases have been specified and which have
79
- not. Note the balance between the examples for the `create` and `update`
80
- actions. If the `redirects to the widget` example was missing from one or the
81
- other, it would be easy to spot.
82
-
83
- Take a look at the generated `spec/controllers/widgets_controller_spec.rb` to
84
- get a sense of how to organize your specs to generate output like this.