rspec-rails 2.6.0.rc6 → 2.6.0

Sign up to get free protection for your applications and to get access to all the features.
@@ -4,7 +4,7 @@ rvm:
4
4
  - 1.9.2
5
5
  gemfile:
6
6
  - gemfiles/rails-3.0.7
7
- - gemfiles/rails-3-0-stable
8
7
  - gemfiles/rails-3.1.0.beta1
8
+ - gemfiles/rails-master
9
9
  env:
10
10
  - CI=true
data/Rakefile CHANGED
@@ -16,11 +16,25 @@ rescue
16
16
  sh "bundle install"
17
17
  Bundler.setup
18
18
  else
19
- raise "You need to install a bundle first. Try 'thor rails:use 3.0.7'"
19
+ raise "You need to install a bundle first. Try 'thor gemfile:use 3.0.7'"
20
20
  end
21
21
  end
22
22
  Bundler::GemHelper.install_tasks
23
23
 
24
+ task :build => :raise_if_psych_is_defined
25
+
26
+ task :raise_if_psych_is_defined do
27
+ if defined?(Psych)
28
+ raise <<-MSG
29
+ ===============================================================================
30
+ Gems compiled in Ruby environments with Psych loaded are incompatible with Ruby
31
+ environments that don't have Psych loaded. Try building this gem in Ruby 1.8.7
32
+ instead.
33
+ ===============================================================================
34
+ MSG
35
+ end
36
+ end
37
+
24
38
  require 'rake'
25
39
  require 'yaml'
26
40
 
@@ -70,11 +84,22 @@ namespace :generate do
70
84
  desc "generate a fresh app with rspec installed"
71
85
  task :app do |t|
72
86
  unless File.directory?('./tmp/example_app')
73
- sh "rails new ./tmp/example_app"
87
+ sh "rails new ./tmp/example_app --skip-javascript --skip-gemfile --skip-git"
74
88
  bindir = File.expand_path("gemfiles/bin")
75
89
  if test ?d, bindir
76
90
  Dir.chdir("./tmp/example_app") do
91
+ sh "rm -rf test"
77
92
  sh "ln -s #{bindir}"
93
+ application_filename = "config/application.rb"
94
+ application_file = File.read(application_filename)
95
+ sh "rm #{application_filename}"
96
+ puts "rewrite #{application_filename} with config.assets.enabled = false"
97
+ File.open(application_filename, "w") do |f|
98
+ f.write application_file.gsub("config.assets.enabled = true","config.assets.enabled = false")
99
+ end
100
+ "config/initializers/wrap_parameters.rb".tap do |f|
101
+ sh "rm #{f}" if test ?f, f
102
+ end
78
103
  end
79
104
  end
80
105
  end
data/Thorfile CHANGED
@@ -1,10 +1,40 @@
1
- class Rails < Thor
1
+ class Gemfile < Thor
2
2
  desc "use VERSION", "installs the bundle using gemfiles/rails-VERSION"
3
3
  def use(version)
4
- gemfile = "--gemfile gemfiles/rails-#{version}"
5
- say `bundle install #{gemfile} --binstubs`
6
- say `bundle #{gemfile} update rails` unless version =~ /^\d\.\d\.\d$/
4
+ "gemfiles/rails-#{version}".tap do |gemfile|
5
+ ENV["BUNDLE_GEMFILE"] = File.expand_path(gemfile)
6
+ say "Using #{gemfile}"
7
+ end
8
+ "bundle install --binstubs".tap do |m|
9
+ say m
10
+ system m
11
+ end
12
+ unless version =~ /^\d\.\d\.\d/
13
+ "bundle update rails".tap do |m|
14
+ say m
15
+ system m
16
+ end
17
+ end
7
18
  say `ln -s gemfiles/bin` unless File.exist?('bin')
8
19
  `echo rails-#{version} > ./.gemfile`
9
20
  end
21
+
22
+ desc "which", "print out the configured gemfile"
23
+ def which
24
+ say `cat ./.gemfile`
25
+ end
26
+
27
+ desc "list", "list the available options for 'thor gemfile:use'"
28
+ def list
29
+ all = `ls gemfiles`.chomp.split.grep(/^rails/).reject {|i| i =~ /lock$/}
30
+
31
+ versions = all.grep(/^rails-\d\.\d/)
32
+ branches = all - versions
33
+
34
+ puts "releases:"
35
+ versions.sort.reverse.each {|i| puts i}
36
+ puts
37
+ puts "branches:"
38
+ branches.sort.reverse.each {|i| puts i}
39
+ end
10
40
  end
@@ -1,17 +1,12 @@
1
- ### 2.6.0.rc6 / 2011-05-06
1
+ ### 2.6.0 / 2011-05-12
2
2
 
3
- [full changelog](http://github.com/rspec/rspec-rails/compare/v2.6.0.rc4...v2.6.0.rc6)
4
-
5
- * Bug fixes
6
- * Fix load order issue w/ Capybara (oleg dashevskii)
7
- * Relax the dependencies on rails gems to >= 3.0 (Joel Moss)
8
- * Fix monkey patches that broke due to internal changes in rails-3.1.0.beta1
9
-
10
- ### 2.6.0.rc4 / 2011-05-01
11
-
12
- [full changelog](http://github.com/rspec/rspec-rails/compare/v2.6.0.rc2...v2.6.0.rc4)
3
+ [full changelog](http://github.com/rspec/rspec-rails/compare/v2.5.0...v2.6.0)
13
4
 
14
5
  * Enhancements
6
+ * rails 3 shortcuts for routing specs (Joe Fiorini)
7
+ * support nested resources in generators (Tim McEwan)
8
+ * require 'rspec/rails/mocks' to use `mock_model` without requiring the whole
9
+ rails framework
15
10
  * Update the controller spec generated by the rails scaffold generator:
16
11
  * Add documentation to the generated spec
17
12
  * Use `any_instance` to avoid stubbing finders
@@ -20,20 +15,12 @@
20
15
  * Decorate paths passed to `[append|prepend]_view_paths` with empty templates
21
16
  unless rendering views. (Mark Turner)
22
17
 
23
- ### 2.6.0.rc2 / 2011-04-18
24
-
25
- [full changelog](http://github.com/rspec/rspec-rails/compare/v2.5.0...v2.6.0.rc2)
26
-
27
- * Enhancments
28
- * rails 3 shortcuts for routing specs (Joe Fiorini)
29
- * support nested resources in generators (Tim McEwan)
30
- * require 'rspec/rails/mocks' to use `mock_model` without requiring the whole
31
- rails framework
32
-
33
18
  * Bug fixes
34
19
  * fix typo in "rake spec:statsetup" (Curtis Schofield)
35
20
  * expose named routes in anonymous controller specs (Andy Lindeman)
36
21
  * error when generating namespaced scaffold resources (Andy Lindeman)
22
+ * Fix load order issue w/ Capybara (oleg dashevskii)
23
+ * Fix monkey patches that broke due to internal changes in rails-3.1.0.beta1
37
24
 
38
25
  ### 2.5.0 / 2011-02-05
39
26
 
@@ -5,4 +5,4 @@ controllers, etc, RSpec specs are generated instead of Test::Unit tests.
5
5
 
6
6
  Note that the generators are there to help you get started, but they are no
7
7
  substitute for writing your own examples, and they are only guaranteed to work
8
- out of the box for the default scenario (ActiveRecord + Webrat).
8
+ out of the box for with Rails' defaults (ActiveRecord, no Capybara or Webrat).
@@ -1,7 +1,7 @@
1
1
  Feature: redirect_to matcher
2
2
 
3
- The `redirect_to` matcher is used to specify that the redirect called in the
4
- latest action ended with the intended behaviour. Essentially, it delegates to
3
+ The `redirect_to` matcher is used to specify that a request redirects to a
4
+ given template or action. It delegates to
5
5
  [`assert_redirected_to`](http://api.rubyonrails.org/classes/ActionDispatch/Assertions/ResponseAssertions.html#method-i-assert_redirected_to).
6
6
 
7
7
  It is available in controller specs (spec/controllers) and request
@@ -1,10 +1,13 @@
1
1
  Feature: render_template matcher
2
2
 
3
- This matcher just delegates to the Rails assertion method
4
- "assert_template". For complete info on the available options,
5
- please take a look at the Rails documentation.
3
+ The `render_template` matcher is used to specify that a request renders a
4
+ given template. It delegates to
5
+ [`assert_template`](http://api.rubyonrails.org/classes/ActionController/TemplateAssertions.html#method-i-assert_template)
6
6
 
7
- This method is available in spec/controllers and spec/requests.
7
+ It is available in controller specs (spec/controllers) and request
8
+ specs (spec/requests).
9
+
10
+ NOTE: use `redirect_to(:action => 'new')` for redirects, not `render_template`.
8
11
 
9
12
  Scenario: render_template with three possible options
10
13
  Given a file named "spec/controllers/gadgets_spec.rb" with:
@@ -12,12 +15,12 @@ Feature: render_template matcher
12
15
  require "spec_helper"
13
16
 
14
17
  describe GadgetsController do
15
- describe "#index" do
18
+ describe "GET #index" do
16
19
  subject { get :index }
17
20
 
18
- specify { should render_template(:index) }
19
- specify { should render_template("index") }
20
- specify { should render_template("gadgets/index") }
21
+ it { should render_template(:index) }
22
+ it { should render_template("index") }
23
+ it { should render_template("gadgets/index") }
21
24
  end
22
25
  end
23
26
  """
@@ -4,7 +4,7 @@ Feature: route_to matcher
4
4
  It is most valuable when specifying routes other than standard RESTful
5
5
  routes.
6
6
 
7
- get("/").should route_to("welcome#index")
7
+ get("/").should route_to("welcome#index") # new in 2.6.0
8
8
 
9
9
  or
10
10
 
@@ -3,14 +3,3 @@ require File.expand_path("../base.rb", __FILE__)
3
3
  extend GemfileBase
4
4
 
5
5
  gem "rails", "3.1.0.beta1"
6
-
7
- # From the Gemfile generated by 'rails new ....'
8
- gem 'sass'
9
- gem 'coffee-script'
10
- gem 'uglifier'
11
- gem 'jquery-rails'
12
-
13
- group :test do
14
- # Pretty printed test output
15
- gem 'turn', :require => false
16
- end
@@ -1,7 +1,7 @@
1
1
  module RSpec # :nodoc:
2
2
  module Rails # :nodoc:
3
3
  module Version # :nodoc:
4
- STRING = '2.6.0.rc6'
4
+ STRING = '2.6.0'
5
5
  end
6
6
  end
7
7
  end
@@ -22,9 +22,9 @@ Gem::Specification.new do |s|
22
22
  s.rdoc_options = ["--charset=UTF-8"]
23
23
  s.require_path = "lib"
24
24
 
25
- s.add_runtime_dependency(%q<activesupport>, [">= 3.0"])
26
- s.add_runtime_dependency(%q<actionpack>, [">= 3.0"])
27
- s.add_runtime_dependency(%q<railties>, [">= 3.0"])
25
+ s.add_runtime_dependency(%q<activesupport>, ["~> 3.0"])
26
+ s.add_runtime_dependency(%q<actionpack>, ["~> 3.0"])
27
+ s.add_runtime_dependency(%q<railties>, ["~> 3.0"])
28
28
  if RSpec::Rails::Version::STRING =~ /[a-zA-Z]+/
29
29
  s.add_runtime_dependency "rspec", "= #{RSpec::Rails::Version::STRING}"
30
30
  else
metadata CHANGED
@@ -1,15 +1,13 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: rspec-rails
3
3
  version: !ruby/object:Gem::Version
4
- hash: 15424057
5
- prerelease: 6
4
+ hash: 23
5
+ prerelease:
6
6
  segments:
7
7
  - 2
8
8
  - 6
9
9
  - 0
10
- - rc
11
- - 6
12
- version: 2.6.0.rc6
10
+ version: 2.6.0
13
11
  platform: ruby
14
12
  authors:
15
13
  - David Chelimsky
@@ -17,14 +15,14 @@ autorequire:
17
15
  bindir: bin
18
16
  cert_chain: []
19
17
 
20
- date: 2011-05-06 00:00:00 -05:00
18
+ date: 2011-05-12 00:00:00 -05:00
21
19
  default_executable:
22
20
  dependencies:
23
21
  - !ruby/object:Gem::Dependency
24
22
  version_requirements: &id001 !ruby/object:Gem::Requirement
25
23
  none: false
26
24
  requirements:
27
- - - ">="
25
+ - - ~>
28
26
  - !ruby/object:Gem::Version
29
27
  hash: 7
30
28
  segments:
@@ -39,7 +37,7 @@ dependencies:
39
37
  version_requirements: &id002 !ruby/object:Gem::Requirement
40
38
  none: false
41
39
  requirements:
42
- - - ">="
40
+ - - ~>
43
41
  - !ruby/object:Gem::Version
44
42
  hash: 7
45
43
  segments:
@@ -54,7 +52,7 @@ dependencies:
54
52
  version_requirements: &id003 !ruby/object:Gem::Requirement
55
53
  none: false
56
54
  requirements:
57
- - - ">="
55
+ - - ~>
58
56
  - !ruby/object:Gem::Version
59
57
  hash: 7
60
58
  segments:
@@ -69,16 +67,14 @@ dependencies:
69
67
  version_requirements: &id004 !ruby/object:Gem::Requirement
70
68
  none: false
71
69
  requirements:
72
- - - "="
70
+ - - ~>
73
71
  - !ruby/object:Gem::Version
74
- hash: 15424057
72
+ hash: 23
75
73
  segments:
76
74
  - 2
77
75
  - 6
78
76
  - 0
79
- - rc
80
- - 6
81
- version: 2.6.0.rc6
77
+ version: 2.6.0
82
78
  prerelease: false
83
79
  type: :runtime
84
80
  requirement: *id004
@@ -262,21 +258,19 @@ required_ruby_version: !ruby/object:Gem::Requirement
262
258
  required_rubygems_version: !ruby/object:Gem::Requirement
263
259
  none: false
264
260
  requirements:
265
- - - ">"
261
+ - - ">="
266
262
  - !ruby/object:Gem::Version
267
- hash: 25
263
+ hash: 3
268
264
  segments:
269
- - 1
270
- - 3
271
- - 1
272
- version: 1.3.1
265
+ - 0
266
+ version: "0"
273
267
  requirements: []
274
268
 
275
269
  rubyforge_project: rspec
276
270
  rubygems_version: 1.6.2
277
271
  signing_key:
278
272
  specification_version: 3
279
- summary: rspec-rails-2.6.0.rc6
273
+ summary: rspec-rails-2.6.0
280
274
  test_files:
281
275
  - features/Autotest.md
282
276
  - features/Changelog.md