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.
- data/.gitignore +9 -4
- data/.travis.yml +11 -0
- data/README_DEV.md +43 -0
- data/Rakefile +54 -27
- data/Thorfile +6 -21
- data/features/Autotest.md +7 -0
- data/features/Changelog.md +17 -2
- data/features/Upgrade.md +13 -12
- data/features/controller_specs/README.md +18 -10
- data/features/controller_specs/anonymous_controller.feature +5 -5
- data/features/controller_specs/controller_spec.feature +1 -1
- data/features/controller_specs/isolation_from_views.feature +2 -2
- data/features/controller_specs/render_views.feature +3 -3
- data/features/helper_specs/helper_spec.feature +3 -3
- data/features/mailer_specs/url_helpers.feature +2 -2
- data/features/matchers/new_record_matcher.feature +2 -2
- data/features/matchers/redirect_to_matcher.feature +1 -1
- data/features/matchers/render_template_matcher.feature +1 -1
- data/features/mocks/mock_model.feature +21 -5
- data/features/mocks/stub_model.feature +2 -2
- data/features/model_specs/errors_on.feature +1 -1
- data/features/model_specs/transactional_examples.feature +10 -5
- data/features/routing_specs/README.md +2 -1
- data/features/routing_specs/be_routable_matcher.feature +5 -5
- data/features/routing_specs/named_routes.feature +1 -1
- data/features/routing_specs/route_to_matcher.feature +28 -8
- data/features/step_definitions/additional_cli_steps.rb +1 -1
- data/features/support/env.rb +7 -18
- data/features/view_specs/inferred_controller_path.feature +3 -3
- data/features/view_specs/stub_template.feature +2 -2
- data/features/view_specs/view_spec.feature +8 -8
- data/gemfiles/base.rb +45 -0
- data/gemfiles/rails-3-0-stable +7 -0
- data/gemfiles/rails-3.0.0 +5 -0
- data/gemfiles/rails-3.0.1 +5 -0
- data/gemfiles/rails-3.0.2 +5 -0
- data/gemfiles/rails-3.0.3 +5 -0
- data/gemfiles/rails-3.0.4 +5 -0
- data/gemfiles/rails-3.0.5 +5 -0
- data/gemfiles/rails-3.0.6 +5 -0
- data/gemfiles/rails-master +7 -0
- data/lib/generators/rspec/scaffold/scaffold_generator.rb +20 -2
- data/lib/generators/rspec/scaffold/templates/controller_spec.rb +23 -23
- data/lib/generators/rspec/scaffold/templates/edit_spec.rb +7 -7
- data/lib/generators/rspec/scaffold/templates/index_spec.rb +2 -2
- data/lib/generators/rspec/scaffold/templates/new_spec.rb +5 -5
- data/lib/generators/rspec/scaffold/templates/routing_spec.rb +14 -14
- data/lib/generators/rspec/scaffold/templates/show_spec.rb +2 -2
- data/lib/rspec/rails/example/controller_example_group.rb +9 -1
- data/lib/rspec/rails/example/routing_example_group.rb +1 -0
- data/lib/rspec/rails/matchers/routing_matchers.rb +23 -2
- data/lib/rspec/rails/mocks.rb +3 -0
- data/lib/rspec/rails/tasks/rspec.rake +1 -1
- data/lib/rspec/rails/version.rb +1 -1
- data/rspec-rails.gemspec +5 -36
- data/spec/autotest/rails_rspec2_spec.rb +2 -7
- data/spec/rspec/rails/example/controller_example_group_spec.rb +25 -0
- data/spec/rspec/rails/matchers/route_to_spec.rb +15 -0
- data/spec/rspec/rails/mocks/ar_classes.rb +5 -2
- data/spec/rspec/rails/view_rendering_spec.rb +0 -6
- data/templates/generate_stuff.rb +2 -1
- data/templates/run_specs.rb +2 -2
- metadata +54 -77
- data/Gemfile-3-0-stable +0 -6
- data/Gemfile-3.0.0 +0 -3
- data/Gemfile-3.0.3 +0 -3
- data/Gemfile-base +0 -38
- data/Gemfile-master +0 -5
- data/specs.watchr +0 -59
- data/templates/Gemfile-base +0 -17
data/Gemfile-3-0-stable
DELETED
data/Gemfile-3.0.0
DELETED
data/Gemfile-3.0.3
DELETED
data/Gemfile-base
DELETED
@@ -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
|
data/Gemfile-master
DELETED
data/specs.watchr
DELETED
@@ -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
|
data/templates/Gemfile-base
DELETED
@@ -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'
|