dchelimsky-rspec-rails 1.1.99.7 → 1.1.99.8
Sign up to get free protection for your applications and to get access to all the features.
- data/History.txt +3 -1
- data/Rakefile +1 -1
- data/Upgrade.markdown +1 -0
- data/generators/rspec_scaffold/templates/edit_erb_spec.rb +1 -1
- data/generators/rspec_scaffold/templates/index_erb_spec.rb +1 -1
- data/generators/rspec_scaffold/templates/new_erb_spec.rb +1 -1
- data/generators/rspec_scaffold/templates/show_erb_spec.rb +1 -1
- data/lib/spec/rails/example/view_example_group.rb +8 -1
- data/lib/spec/rails/spec_server.rb +8 -4
- data/lib/spec/rails/version.rb +1 -1
- data/rspec-rails.gemspec +6 -6
- data/spec/spec/rails/example/view_example_group_spec.rb +9 -0
- metadata +5 -5
data/History.txt
CHANGED
@@ -1,4 +1,4 @@
|
|
1
|
-
=== Version 1.1.99.
|
1
|
+
=== Version 1.1.99.x (in git)
|
2
2
|
|
3
3
|
IMPORTANT: See Upgrade.markdown for information about upgrading to rspec-rails-1.1.99.4
|
4
4
|
|
@@ -34,6 +34,7 @@ IMPORTANT: This release includes the following backwards-compatibility-breaking
|
|
34
34
|
* generated specs use declarative docstrings
|
35
35
|
* rspec_scaffold generator generates layout and stylesheet (per Rails-2.3)
|
36
36
|
* add bypass_rescue for controller specs
|
37
|
+
* infer template path from the first arg passed to describe in view specs
|
37
38
|
|
38
39
|
* bug fixes
|
39
40
|
|
@@ -45,6 +46,7 @@ IMPORTANT: This release includes the following backwards-compatibility-breaking
|
|
45
46
|
* support 2 arg version of ActionController::Base#render (reported by Nathan Wilmes)
|
46
47
|
* rake spec:server:start doesn't choke if there is no tmp directory
|
47
48
|
* force cache_classes = false when running with spec_server. Closes #287.
|
49
|
+
* keep spec_server working against edge rails (Jonathan Tron). Closes #685.
|
48
50
|
|
49
51
|
=== Version 1.1.12 / 2009-01-11
|
50
52
|
|
data/Rakefile
CHANGED
@@ -20,7 +20,7 @@ Hoe.new('rspec-rails', Spec::Rails::VERSION::STRING) do |p|
|
|
20
20
|
p.description = "Behaviour Driven Development for Ruby on Rails."
|
21
21
|
p.rubyforge_name = 'rspec'
|
22
22
|
p.developer('RSpec Development Team', 'rspec-devel@rubyforge.org')
|
23
|
-
p.extra_deps = [["
|
23
|
+
p.extra_deps = [["rspec","1.1.99.8"],["rack",">=0.4.0"]]
|
24
24
|
p.extra_dev_deps = [["cucumber",">= 0.1.13"]]
|
25
25
|
p.remote_rdoc_dir = "rspec-rails/#{Spec::Rails::VERSION::STRING}"
|
26
26
|
end
|
data/Upgrade.markdown
CHANGED
@@ -14,6 +14,7 @@ This release supports the following versions of rails:
|
|
14
14
|
Be sure to run "script/generate rspec" and allow the following files to be overwritten:
|
15
15
|
|
16
16
|
* lib/tasks/rspec.rake
|
17
|
+
* script/spec
|
17
18
|
* script/spec_server
|
18
19
|
|
19
20
|
## controller.use\_rails\_error\_handling! is deprecated
|
@@ -14,7 +14,7 @@ describe "/<%= table_name %>/edit.<%= default_file_extension %>" do
|
|
14
14
|
end
|
15
15
|
|
16
16
|
it "renders the edit <%= file_name %> form" do
|
17
|
-
render
|
17
|
+
render
|
18
18
|
|
19
19
|
response.should have_tag("form[action=#{<%= file_name %>_path(@<%= file_name %>)}][method=post]") do
|
20
20
|
<% for attribute in output_attributes -%>
|
@@ -19,7 +19,7 @@ describe "/<%= table_name %>/index.<%= default_file_extension %>" do
|
|
19
19
|
end
|
20
20
|
|
21
21
|
it "renders a list of <%= table_name %>" do
|
22
|
-
render
|
22
|
+
render
|
23
23
|
<% for attribute in output_attributes -%>
|
24
24
|
response.should have_tag("tr>td", <%= attribute.default_value %>.to_s, 2)
|
25
25
|
<% end -%>
|
@@ -14,7 +14,7 @@ describe "/<%= table_name %>/new.<%= default_file_extension %>" do
|
|
14
14
|
end
|
15
15
|
|
16
16
|
it "renders new <%= file_name %> form" do
|
17
|
-
render
|
17
|
+
render
|
18
18
|
|
19
19
|
response.should have_tag("form[action=?][method=post]", <%= table_name %>_path) do
|
20
20
|
<% for attribute in output_attributes -%>
|
@@ -14,7 +14,7 @@ describe "/<%= table_name %>/show.<%= default_file_extension %>" do
|
|
14
14
|
end
|
15
15
|
|
16
16
|
it "renders attributes in <p>" do
|
17
|
-
render
|
17
|
+
render
|
18
18
|
<% for attribute in output_attributes -%>
|
19
19
|
response.should have_text(/<%= Regexp.escape(attribute.default_value).gsub(/^"|"$/, '')%>/)
|
20
20
|
<% end -%>
|
@@ -119,8 +119,15 @@ module Spec
|
|
119
119
|
# See Spec::Rails::Example::ViewExampleGroup for more information.
|
120
120
|
def render(*args)
|
121
121
|
options = Hash === args.last ? args.pop : {}
|
122
|
+
|
123
|
+
if args.empty?
|
124
|
+
unless [:partial, :inline, :file, :template, :xml, :json, :update].any? {|k| options.has_key? k}
|
125
|
+
args << self.class.description_parts.first
|
126
|
+
end
|
127
|
+
end
|
128
|
+
|
122
129
|
options[:template] = args.first.to_s.sub(/^\//,'') unless args.empty?
|
123
|
-
|
130
|
+
|
124
131
|
set_base_view_path(options)
|
125
132
|
add_helpers(options)
|
126
133
|
|
@@ -53,12 +53,16 @@ module Spec
|
|
53
53
|
|
54
54
|
require 'action_controller/dispatcher'
|
55
55
|
dispatcher = ::ActionController::Dispatcher.new($stdout)
|
56
|
-
|
56
|
+
|
57
|
+
if ::ActionController::Dispatcher.respond_to?(:reload_application)
|
58
|
+
::ActionController::Dispatcher.reload_application
|
59
|
+
else
|
60
|
+
dispatcher.reload_application
|
61
|
+
end
|
57
62
|
|
58
63
|
if Object.const_defined?(:Fixtures) && Fixtures.respond_to?(:reset_cache)
|
59
64
|
Fixtures.reset_cache
|
60
65
|
end
|
61
|
-
|
62
66
|
|
63
67
|
unless Object.const_defined?(:ApplicationController)
|
64
68
|
%w(application_controller.rb application.rb).each do |name|
|
@@ -68,8 +72,8 @@ module Spec
|
|
68
72
|
load "#{RAILS_ROOT}/spec/spec_helper.rb"
|
69
73
|
|
70
74
|
if in_memory_database?
|
71
|
-
load "#{RAILS_ROOT}/db/schema.rb"
|
72
|
-
ActiveRecord::Migrator.up('db/migrate')
|
75
|
+
load "#{RAILS_ROOT}/db/schema.rb"
|
76
|
+
ActiveRecord::Migrator.up('db/migrate')
|
73
77
|
end
|
74
78
|
|
75
79
|
::Spec::Runner::CommandLine.run(
|
data/lib/spec/rails/version.rb
CHANGED
data/rspec-rails.gemspec
CHANGED
@@ -2,11 +2,11 @@
|
|
2
2
|
|
3
3
|
Gem::Specification.new do |s|
|
4
4
|
s.name = %q{rspec-rails}
|
5
|
-
s.version = "1.1.99.
|
5
|
+
s.version = "1.1.99.8"
|
6
6
|
|
7
7
|
s.required_rubygems_version = Gem::Requirement.new(">= 0") if s.respond_to? :required_rubygems_version=
|
8
8
|
s.authors = ["RSpec Development Team"]
|
9
|
-
s.date = %q{2009-02-
|
9
|
+
s.date = %q{2009-02-23}
|
10
10
|
s.description = %q{Behaviour Driven Development for Ruby on Rails.}
|
11
11
|
s.email = ["rspec-devel@rubyforge.org"]
|
12
12
|
s.extra_rdoc_files = ["History.txt", "License.txt", "Manifest.txt", "README.txt", "TODO.txt", "generators/rspec/templates/previous_failures.txt"]
|
@@ -17,23 +17,23 @@ Gem::Specification.new do |s|
|
|
17
17
|
s.require_paths = ["lib"]
|
18
18
|
s.rubyforge_project = %q{rspec}
|
19
19
|
s.rubygems_version = %q{1.3.1}
|
20
|
-
s.summary = %q{rspec-rails 1.1.99.
|
20
|
+
s.summary = %q{rspec-rails 1.1.99.8}
|
21
21
|
|
22
22
|
if s.respond_to? :specification_version then
|
23
23
|
current_version = Gem::Specification::CURRENT_SPECIFICATION_VERSION
|
24
24
|
s.specification_version = 2
|
25
25
|
|
26
26
|
if Gem::Version.new(Gem::RubyGemsVersion) >= Gem::Version.new('1.2.0') then
|
27
|
-
s.add_runtime_dependency(%q<
|
27
|
+
s.add_runtime_dependency(%q<rspec>, ["= 1.1.99.8"])
|
28
28
|
s.add_runtime_dependency(%q<rack>, [">= 0.4.0"])
|
29
29
|
s.add_development_dependency(%q<cucumber>, [">= 0.1.13"])
|
30
30
|
s.add_development_dependency(%q<hoe>, [">= 1.8.3"])
|
31
31
|
else
|
32
|
-
s.add_dependency(%q<
|
32
|
+
s.add_dependency(%q<rspec>, ["= 1.1.99.8"])
|
33
33
|
s.add_dependency(%q<rack>, [">= 0.4.0"])
|
34
34
|
end
|
35
35
|
else
|
36
|
-
s.add_dependency(%q<
|
36
|
+
s.add_dependency(%q<rspec>, ["= 1.1.99.8"])
|
37
37
|
s.add_dependency(%q<rack>, [">= 0.4.0"])
|
38
38
|
end
|
39
39
|
end
|
@@ -261,6 +261,15 @@ describe "render 'view_spec/foo/show.rhtml'", :type => :view do
|
|
261
261
|
end
|
262
262
|
end
|
263
263
|
|
264
|
+
describe "view_spec/foo/show.rhtml", :type => :view do
|
265
|
+
context "rendered with no args" do
|
266
|
+
it "renders just fine" do
|
267
|
+
render
|
268
|
+
request.path_parameters[:action].should == 'show'
|
269
|
+
end
|
270
|
+
end
|
271
|
+
end
|
272
|
+
|
264
273
|
describe "setting path parameters", :type => :view do
|
265
274
|
describe "(controller)" do
|
266
275
|
it "should supercede the default path parameters" do
|
metadata
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: dchelimsky-rspec-rails
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 1.1.99.
|
4
|
+
version: 1.1.99.8
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- RSpec Development Team
|
@@ -9,18 +9,18 @@ autorequire:
|
|
9
9
|
bindir: bin
|
10
10
|
cert_chain: []
|
11
11
|
|
12
|
-
date: 2009-02-
|
12
|
+
date: 2009-02-23 00:00:00 -08:00
|
13
13
|
default_executable:
|
14
14
|
dependencies:
|
15
15
|
- !ruby/object:Gem::Dependency
|
16
|
-
name:
|
16
|
+
name: rspec
|
17
17
|
type: :runtime
|
18
18
|
version_requirement:
|
19
19
|
version_requirements: !ruby/object:Gem::Requirement
|
20
20
|
requirements:
|
21
21
|
- - "="
|
22
22
|
- !ruby/object:Gem::Version
|
23
|
-
version: 1.1.99.
|
23
|
+
version: 1.1.99.8
|
24
24
|
version:
|
25
25
|
- !ruby/object:Gem::Dependency
|
26
26
|
name: rack
|
@@ -257,6 +257,6 @@ rubyforge_project: rspec
|
|
257
257
|
rubygems_version: 1.2.0
|
258
258
|
signing_key:
|
259
259
|
specification_version: 2
|
260
|
-
summary: rspec-rails 1.1.99.
|
260
|
+
summary: rspec-rails 1.1.99.8
|
261
261
|
test_files: []
|
262
262
|
|