rspec-rails 2.5.0 → 2.6.0.rc2

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.
Files changed (70) hide show
  1. data/.gitignore +9 -4
  2. data/.travis.yml +11 -0
  3. data/README_DEV.md +43 -0
  4. data/Rakefile +54 -27
  5. data/Thorfile +6 -21
  6. data/features/Autotest.md +7 -0
  7. data/features/Changelog.md +17 -2
  8. data/features/Upgrade.md +13 -12
  9. data/features/controller_specs/README.md +18 -10
  10. data/features/controller_specs/anonymous_controller.feature +5 -5
  11. data/features/controller_specs/controller_spec.feature +1 -1
  12. data/features/controller_specs/isolation_from_views.feature +2 -2
  13. data/features/controller_specs/render_views.feature +3 -3
  14. data/features/helper_specs/helper_spec.feature +3 -3
  15. data/features/mailer_specs/url_helpers.feature +2 -2
  16. data/features/matchers/new_record_matcher.feature +2 -2
  17. data/features/matchers/redirect_to_matcher.feature +1 -1
  18. data/features/matchers/render_template_matcher.feature +1 -1
  19. data/features/mocks/mock_model.feature +21 -5
  20. data/features/mocks/stub_model.feature +2 -2
  21. data/features/model_specs/errors_on.feature +1 -1
  22. data/features/model_specs/transactional_examples.feature +10 -5
  23. data/features/routing_specs/README.md +2 -1
  24. data/features/routing_specs/be_routable_matcher.feature +5 -5
  25. data/features/routing_specs/named_routes.feature +1 -1
  26. data/features/routing_specs/route_to_matcher.feature +28 -8
  27. data/features/step_definitions/additional_cli_steps.rb +1 -1
  28. data/features/support/env.rb +7 -18
  29. data/features/view_specs/inferred_controller_path.feature +3 -3
  30. data/features/view_specs/stub_template.feature +2 -2
  31. data/features/view_specs/view_spec.feature +8 -8
  32. data/gemfiles/base.rb +45 -0
  33. data/gemfiles/rails-3-0-stable +7 -0
  34. data/gemfiles/rails-3.0.0 +5 -0
  35. data/gemfiles/rails-3.0.1 +5 -0
  36. data/gemfiles/rails-3.0.2 +5 -0
  37. data/gemfiles/rails-3.0.3 +5 -0
  38. data/gemfiles/rails-3.0.4 +5 -0
  39. data/gemfiles/rails-3.0.5 +5 -0
  40. data/gemfiles/rails-3.0.6 +5 -0
  41. data/gemfiles/rails-master +7 -0
  42. data/lib/generators/rspec/scaffold/scaffold_generator.rb +20 -2
  43. data/lib/generators/rspec/scaffold/templates/controller_spec.rb +23 -23
  44. data/lib/generators/rspec/scaffold/templates/edit_spec.rb +7 -7
  45. data/lib/generators/rspec/scaffold/templates/index_spec.rb +2 -2
  46. data/lib/generators/rspec/scaffold/templates/new_spec.rb +5 -5
  47. data/lib/generators/rspec/scaffold/templates/routing_spec.rb +14 -14
  48. data/lib/generators/rspec/scaffold/templates/show_spec.rb +2 -2
  49. data/lib/rspec/rails/example/controller_example_group.rb +9 -1
  50. data/lib/rspec/rails/example/routing_example_group.rb +1 -0
  51. data/lib/rspec/rails/matchers/routing_matchers.rb +23 -2
  52. data/lib/rspec/rails/mocks.rb +3 -0
  53. data/lib/rspec/rails/tasks/rspec.rake +1 -1
  54. data/lib/rspec/rails/version.rb +1 -1
  55. data/rspec-rails.gemspec +5 -36
  56. data/spec/autotest/rails_rspec2_spec.rb +2 -7
  57. data/spec/rspec/rails/example/controller_example_group_spec.rb +25 -0
  58. data/spec/rspec/rails/matchers/route_to_spec.rb +15 -0
  59. data/spec/rspec/rails/mocks/ar_classes.rb +5 -2
  60. data/spec/rspec/rails/view_rendering_spec.rb +0 -6
  61. data/templates/generate_stuff.rb +2 -1
  62. data/templates/run_specs.rb +2 -2
  63. metadata +54 -77
  64. data/Gemfile-3-0-stable +0 -6
  65. data/Gemfile-3.0.0 +0 -3
  66. data/Gemfile-3.0.3 +0 -3
  67. data/Gemfile-base +0 -38
  68. data/Gemfile-master +0 -5
  69. data/specs.watchr +0 -59
  70. data/templates/Gemfile-base +0 -17
@@ -1,6 +0,0 @@
1
- instance_eval(File.read("./Gemfile-base"))
2
-
3
- gem "rails", :git => "https://github.com/rails/rails.git", :branch => "3-0-stable"
4
- gem "arel", :git => "https://github.com/rails/arel.git"
5
- gem "rack", :git => "git://github.com/rack/rack.git"
6
-
@@ -1,3 +0,0 @@
1
- instance_eval(File.read("./Gemfile-base"))
2
-
3
- gem "rails", "3.0.0"
@@ -1,3 +0,0 @@
1
- instance_eval(File.read("./Gemfile-base"))
2
-
3
- gem "rails", "3.0.3"
@@ -1,38 +0,0 @@
1
- source "http://rubygems.org"
2
-
3
- %w[rspec rspec-core rspec-expectations rspec-mocks rspec-rails].each do |lib|
4
- library_path = File.expand_path("../../#{lib}", __FILE__)
5
- if File.exist?(library_path)
6
- gem lib, :path => library_path
7
- else
8
- gem lib
9
- end
10
- end
11
-
12
- gem 'sqlite3-ruby', :require => 'sqlite3'
13
- gem "rake", "0.8.7"
14
- gem "cucumber", "0.10.0"
15
- gem "aruba", "0.2.2"
16
- gem "rcov", "0.9.9"
17
- gem "relish", "0.2.0"
18
- gem "guard-rspec", "0.1.9"
19
- gem "growl", "1.0.3"
20
- gem "ZenTest", "~> 4.4.2"
21
- gem "webrat", "0.7.2"
22
-
23
- if RUBY_PLATFORM =~ /darwin/
24
- gem "autotest-fsevent", "~> 0.2.4"
25
- gem "autotest-growl", "~> 0.2.9"
26
- end
27
-
28
- gem "ruby-debug", :platforms => :ruby_18
29
- gem "ruby-debug19", "~> 0.11.6", :platforms => :ruby_19
30
-
31
- platforms :ruby_18, :ruby_19 do
32
- gem "rb-fsevent", "~> 0.3.9"
33
- gem "ruby-prof", "~> 0.9.2"
34
- end
35
-
36
- platforms :jruby do
37
- gem "jruby-openssl"
38
- end
@@ -1,5 +0,0 @@
1
- instance_eval(File.read("./Gemfile-base"))
2
-
3
- gem "rails", :git => "https://github.com/rails/rails.git"
4
- gem "arel", :git => "https://github.com/rails/arel.git"
5
- gem "rack", :git => "https://github.com/rack/rack.git"
@@ -1,59 +0,0 @@
1
- # Run me with:
2
- #
3
- # $ watchr specs.watchr
4
-
5
- # --------------------------------------------------
6
- # Convenience Methods
7
- # --------------------------------------------------
8
- def all_spec_files
9
- Dir['spec/**/*_spec.rb']
10
- end
11
-
12
- def run_spec_matching(thing_to_match)
13
- matches = all_spec_files.grep(/#{thing_to_match}/i)
14
- if matches.empty?
15
- puts "Sorry, thanks for playing, but there were no matches for #{thing_to_match}"
16
- else
17
- run matches.join(' ')
18
- end
19
- end
20
-
21
- def run(files_to_run)
22
- puts("Running: #{files_to_run}")
23
- system("clear;rspec -cfs #{files_to_run}")
24
- no_int_for_you
25
- end
26
-
27
- def run_all_specs
28
- run(all_spec_files.join(' '))
29
- end
30
-
31
- # --------------------------------------------------
32
- # Watchr Rules
33
- # --------------------------------------------------
34
- watch('^spec/(.*)_spec\.rb') { |m| run_spec_matching(m[1]) }
35
- watch('^lib/(.*)\.rb') { |m| run_spec_matching(m[1]) }
36
- watch('^spec/spec_helper\.rb') { run_all_specs }
37
- watch('^spec/support/.*\.rb') { run_all_specs }
38
-
39
- # --------------------------------------------------
40
- # Signal Handling
41
- # --------------------------------------------------
42
-
43
- def no_int_for_you
44
- @sent_an_int = nil
45
- end
46
-
47
- Signal.trap 'INT' do
48
- if @sent_an_int then
49
- puts " A second INT? Ok, I get the message. Shutting down now."
50
- exit
51
- else
52
- puts " Did you just send me an INT? Ugh. I'll quit for real if you do it again."
53
- @sent_an_int = true
54
- Kernel.sleep 1.5
55
- run_all_specs
56
- end
57
- end
58
-
59
- # vim:ft=ruby
@@ -1,17 +0,0 @@
1
- source 'http://rubygems.org'
2
-
3
- group :development, :test do
4
- %w[rspec rspec-core rspec-expectations rspec-mocks rspec-rails].each do |lib|
5
- library_path = File.expand_path("../../../../#{lib}", __FILE__)
6
- if File.exist?(library_path)
7
- gem lib, :path => library_path
8
- else
9
- gem lib
10
- end
11
- end
12
- gem "rcov"
13
- gem "webrat", "0.7.2"
14
- gem "ZenTest", "4.4.2"
15
- end
16
-
17
- gem 'sqlite3-ruby', :require => 'sqlite3'