dchelimsky-rspec-rails 1.1.99.9 → 1.1.99.13
Sign up to get free protection for your applications and to get access to all the features.
- data/.document +7 -0
- data/History.txt +3 -0
- data/Manifest.txt +43 -40
- data/Rakefile +1 -6
- data/Upgrade.markdown +70 -19
- data/generators/rspec/templates/rspec.rake +4 -2
- data/generators/rspec/templates/script/spec +19 -2
- data/generators/rspec/templates/script/spec_server +17 -3
- data/lib/spec/rails/example/controller_example_group.rb +3 -2
- data/lib/spec/rails/example/helper_example_group.rb +6 -20
- data/lib/spec/rails/example/routing_example_group.rb +13 -0
- data/lib/spec/rails/extensions/spec/matchers/have.rb +2 -2
- data/lib/spec/rails/matchers/ar_be_valid.rb +4 -4
- data/lib/spec/rails/matchers/assert_select.rb +35 -20
- data/lib/spec/rails/matchers/have_text.rb +2 -2
- data/lib/spec/rails/matchers/include_text.rb +2 -2
- data/lib/spec/rails/matchers/redirect_to.rb +2 -2
- data/lib/spec/rails/matchers/render_template.rb +2 -2
- data/lib/spec/rails/version.rb +1 -1
- data/rspec-rails.gemspec +8 -8
- data/spec/resources/controllers/controller_spec_controller.rb +4 -0
- data/spec/resources/controllers/example.txt +1 -0
- data/spec/resources/views/controller_spec/{_partial.rhtml → _partial.html.erb} +0 -0
- data/spec/resources/views/controller_spec/{action_setting_flash_after_session_reset.rhtml → action_setting_flash_after_session_reset.html.erb} +0 -0
- data/spec/resources/views/controller_spec/{action_setting_flash_before_session_reset.rhtml → action_setting_flash_before_session_reset.html.erb} +0 -0
- data/spec/resources/views/controller_spec/{action_setting_the_assigns_hash.rhtml → action_setting_the_assigns_hash.html.erb} +0 -0
- data/spec/resources/views/controller_spec/{action_with_errors_in_template.rhtml → action_with_errors_in_template.html.erb} +0 -0
- data/spec/resources/views/controller_spec/{action_with_template.rhtml → action_with_template.html.erb} +0 -0
- data/spec/resources/views/layouts/{application.rhtml → application.html.erb} +0 -0
- data/spec/resources/views/layouts/{simple.rhtml → simple.html.erb} +0 -0
- data/spec/resources/views/render_spec/{_a_partial.rhtml → _a_partial.html.erb} +0 -0
- data/spec/resources/views/render_spec/{action_with_alternate_layout.rhtml → action_with_alternate_layout.html.erb} +0 -0
- data/spec/resources/views/rjs_spec/{_replacement_partial.rhtml → _replacement_partial.html.erb} +0 -0
- data/spec/resources/views/rjs_spec/{hide_div.rjs → hide_div.js.rjs} +0 -0
- data/spec/resources/views/rjs_spec/{hide_page_element.rjs → hide_page_element.js.rjs} +0 -0
- data/spec/resources/views/rjs_spec/{insert_html.rjs → insert_html.js.rjs} +0 -0
- data/spec/resources/views/rjs_spec/{replace.rjs → replace.js.rjs} +0 -0
- data/spec/resources/views/rjs_spec/{replace_html.rjs → replace_html.js.rjs} +0 -0
- data/spec/resources/views/rjs_spec/{replace_html_with_partial.rjs → replace_html_with_partial.js.rjs} +0 -0
- data/spec/resources/views/rjs_spec/{visual_effect.rjs → visual_effect.js.rjs} +0 -0
- data/spec/resources/views/rjs_spec/{visual_toggle_effect.rjs → visual_toggle_effect.js.rjs} +0 -0
- data/spec/resources/views/tag_spec/{no_tags.rhtml → no_tags.html.erb} +0 -0
- data/spec/resources/views/tag_spec/{single_div_with_no_attributes.rhtml → single_div_with_no_attributes.html.erb} +0 -0
- data/spec/resources/views/tag_spec/{single_div_with_one_attribute.rhtml → single_div_with_one_attribute.html.erb} +0 -0
- data/spec/resources/views/view_spec/{_partial.rhtml → _partial.html.erb} +0 -0
- data/spec/resources/views/view_spec/{_partial_used_twice.rhtml → _partial_used_twice.html.erb} +0 -0
- data/spec/resources/views/view_spec/{_partial_with_local_variable.rhtml → _partial_with_local_variable.html.erb} +0 -0
- data/spec/resources/views/view_spec/{_partial_with_sub_partial.rhtml → _partial_with_sub_partial.html.erb} +0 -0
- data/spec/resources/views/view_spec/{_spacer.rhtml → _spacer.html.erb} +0 -0
- data/spec/resources/views/view_spec/{accessor.rhtml → accessor.html.erb} +0 -0
- data/spec/resources/views/view_spec/{block_helper.rhtml → block_helper.html.erb} +0 -0
- data/spec/resources/views/view_spec/{entry_form.rhtml → entry_form.html.erb} +0 -0
- data/spec/resources/views/view_spec/{explicit_helper.rhtml → explicit_helper.html.erb} +0 -0
- data/spec/resources/views/view_spec/foo/{show.rhtml → show.html.erb} +0 -0
- data/spec/resources/views/view_spec/{implicit_helper.rhtml → implicit_helper.html.erb} +0 -0
- data/spec/resources/views/view_spec/{multiple_helpers.rhtml → multiple_helpers.html.erb} +0 -0
- data/spec/resources/views/view_spec/{should_not_receive.rhtml → should_not_receive.html.erb} +0 -0
- data/spec/resources/views/view_spec/{template_with_partial.rhtml → template_with_partial.html.erb} +0 -0
- data/spec/resources/views/view_spec/{template_with_partial_using_collection.rhtml → template_with_partial_using_collection.html.erb} +0 -0
- data/spec/resources/views/view_spec/{template_with_partial_with_array.rhtml → template_with_partial_with_array.html.erb} +0 -0
- data/spec/spec/rails/example/controller_example_group_spec.rb +8 -3
- data/spec/spec/rails/example/helper_example_group_spec.rb +27 -0
- data/spec/spec/rails/example/routing_example_group_spec.rb +9 -0
- data/spec/spec/rails/example/shared_routing_example_group_examples.rb +45 -0
- data/spec/spec/rails/example/view_example_group_spec.rb +3 -3
- data/spec/spec/rails/matchers/assert_select_spec.rb +56 -58
- data/spec/spec/rails/matchers/render_template_spec.rb +45 -37
- metadata +48 -45
- data/spec/resources/views/render_spec/some_action.rjs +0 -1
@@ -0,0 +1,45 @@
|
|
1
|
+
share_as :RoutingExampleGroupSpec do
|
2
|
+
|
3
|
+
class CustomRouteSpecController < ActionController::Base; end
|
4
|
+
class RspecOnRailsSpecsController < ActionController::Base; end
|
5
|
+
|
6
|
+
it "support custom routes" do
|
7
|
+
route_for(:controller => "custom_route_spec", :action => "custom_route").
|
8
|
+
should == "/custom_route"
|
9
|
+
end
|
10
|
+
|
11
|
+
it "support existing routes" do
|
12
|
+
route_for(:controller => "controller_spec", :action => "some_action").
|
13
|
+
should == "/controller_spec/some_action"
|
14
|
+
end
|
15
|
+
|
16
|
+
it "support existing routes with additional parameters" do
|
17
|
+
route_for(:controller => "controller_spec", :action => "some_action", :param => '1').
|
18
|
+
should == "/controller_spec/some_action?param=1"
|
19
|
+
end
|
20
|
+
|
21
|
+
it "recognize routes with methods besides :get" do
|
22
|
+
route_for(:controller => "rspec_on_rails_specs", :action => "update", :id => "37").
|
23
|
+
should == {:path => "/rspec_on_rails_specs/37", :method => :put}
|
24
|
+
end
|
25
|
+
|
26
|
+
it "generate params for custom routes" do
|
27
|
+
params_from(:get, '/custom_route').
|
28
|
+
should == {:controller => "custom_route_spec", :action => "custom_route"}
|
29
|
+
end
|
30
|
+
|
31
|
+
it "generate params for existing routes" do
|
32
|
+
params_from(:get, '/controller_spec/some_action').
|
33
|
+
should == {:controller => "controller_spec", :action => "some_action"}
|
34
|
+
end
|
35
|
+
|
36
|
+
it "generate params for an existing route with a query parameter" do
|
37
|
+
params_from(:get, '/controller_spec/some_action?param=1').
|
38
|
+
should == {:controller => "controller_spec", :action => "some_action", :param => '1'}
|
39
|
+
end
|
40
|
+
|
41
|
+
it "generate params for an existing route with multiple query parameters" do
|
42
|
+
params_from(:get, '/controller_spec/some_action?param1=1¶m2=2').
|
43
|
+
should == {:controller => "controller_spec", :action => "some_action", :param1 => '1', :param2 => '2' }
|
44
|
+
end
|
45
|
+
end
|
@@ -254,14 +254,14 @@ describe "render :inline => ...", :type => :view do
|
|
254
254
|
end
|
255
255
|
end
|
256
256
|
|
257
|
-
describe "render 'view_spec/foo/show
|
257
|
+
describe "render 'view_spec/foo/show'", :type => :view do
|
258
258
|
it "should derive action name using the first part of the template name" do
|
259
|
-
render 'view_spec/foo/show
|
259
|
+
render 'view_spec/foo/show'
|
260
260
|
request.path_parameters[:action].should == 'show'
|
261
261
|
end
|
262
262
|
end
|
263
263
|
|
264
|
-
describe "view_spec/foo/show
|
264
|
+
describe "view_spec/foo/show", :type => :view do
|
265
265
|
context "rendered with no args" do
|
266
266
|
it "renders just fine" do
|
267
267
|
render
|
@@ -12,11 +12,6 @@ class AssertSelectController < ActionController::Base
|
|
12
12
|
@content = content
|
13
13
|
end
|
14
14
|
|
15
|
-
#NOTE - this is commented because response is implemented in lib/spec/rails/context/controller
|
16
|
-
# def response(&block)
|
17
|
-
# @update = block
|
18
|
-
# end
|
19
|
-
#
|
20
15
|
def html()
|
21
16
|
render :text=>@content, :layout=>false, :content_type=>Mime::HTML
|
22
17
|
@content = nil
|
@@ -484,8 +479,7 @@ describe "have_rjs behaviour_type", :type => :controller do
|
|
484
479
|
with_tag("#1")
|
485
480
|
with_tag("#2")
|
486
481
|
with_tag("#3")
|
487
|
-
|
488
|
-
# with_tag("#5")
|
482
|
+
with_tag("#4")
|
489
483
|
end
|
490
484
|
end
|
491
485
|
|
@@ -678,56 +672,6 @@ describe "send_email behaviour_type", :type => :controller do
|
|
678
672
|
|
679
673
|
end
|
680
674
|
|
681
|
-
# describe "An rjs call to :visual_effect, a 'should have_rjs' spec with",
|
682
|
-
# :type => :view do
|
683
|
-
#
|
684
|
-
# before do
|
685
|
-
# render 'rjs_spec/visual_effect'
|
686
|
-
# end
|
687
|
-
#
|
688
|
-
# it "should pass with the correct element name" do
|
689
|
-
# response.should have_rjs(:effect, :fade, 'mydiv')
|
690
|
-
# end
|
691
|
-
#
|
692
|
-
# it "should fail the wrong element name" do
|
693
|
-
# lambda {
|
694
|
-
# response.should have_rjs(:effect, :fade, 'wrongname')
|
695
|
-
# }.should raise_error(SpecFailed)
|
696
|
-
# end
|
697
|
-
#
|
698
|
-
# it "should fail with the correct element but the wrong command" do
|
699
|
-
# lambda {
|
700
|
-
# response.should have_rjs(:effect, :puff, 'mydiv')
|
701
|
-
# }.should raise_error(SpecFailed)
|
702
|
-
# end
|
703
|
-
#
|
704
|
-
# end
|
705
|
-
#
|
706
|
-
# describe "An rjs call to :visual_effect for a toggle, a 'should have_rjs' spec with",
|
707
|
-
# :type => :view do
|
708
|
-
#
|
709
|
-
# before do
|
710
|
-
# render 'rjs_spec/visual_toggle_effect'
|
711
|
-
# end
|
712
|
-
#
|
713
|
-
# it "should pass with the correct element name" do
|
714
|
-
# response.should have_rjs(:effect, :toggle_blind, 'mydiv')
|
715
|
-
# end
|
716
|
-
#
|
717
|
-
# it "should fail with the wrong element name" do
|
718
|
-
# lambda {
|
719
|
-
# response.should have_rjs(:effect, :toggle_blind, 'wrongname')
|
720
|
-
# }.should raise_error(SpecFailed)
|
721
|
-
# end
|
722
|
-
#
|
723
|
-
# it "should fail the correct element but the wrong command" do
|
724
|
-
# lambda {
|
725
|
-
# response.should have_rjs(:effect, :puff, 'mydiv')
|
726
|
-
# }.should raise_error(SpecFailed)
|
727
|
-
# end
|
728
|
-
#
|
729
|
-
# end
|
730
|
-
|
731
675
|
describe "string.should have_tag", :type => :helper do
|
732
676
|
include AssertSelectSpecHelpers
|
733
677
|
|
@@ -745,6 +689,10 @@ describe "string.should have_tag", :type => :helper do
|
|
745
689
|
"<div><p>a paragraph</p></div>".should have_tag("p", "a paragraph")
|
746
690
|
end
|
747
691
|
|
692
|
+
it "should find nested element in one line" do
|
693
|
+
"<div><p>a paragraph</p></div>".should have_tag("div p","a paragraph")
|
694
|
+
end
|
695
|
+
|
748
696
|
it "should find nested element" do
|
749
697
|
"<div><p>a paragraph</p></div>".should have_tag("div") do
|
750
698
|
with_tag("p", "a paragraph")
|
@@ -808,4 +756,54 @@ describe 'selecting in HTML that contains a mock with null_object' do
|
|
808
756
|
html = "<b>#{mock.colour}</b>"
|
809
757
|
lambda {html.should have_tag('b')}.should_not raise_error
|
810
758
|
end
|
811
|
-
end
|
759
|
+
end
|
760
|
+
|
761
|
+
# describe "An rjs call to :visual_effect, a 'should have_rjs' spec with",
|
762
|
+
# :type => :view do
|
763
|
+
#
|
764
|
+
# before do
|
765
|
+
# render 'rjs_spec/visual_effect'
|
766
|
+
# end
|
767
|
+
#
|
768
|
+
# it "should pass with the correct element name" do
|
769
|
+
# response.should have_rjs(:effect, :fade, 'mydiv')
|
770
|
+
# end
|
771
|
+
#
|
772
|
+
# it "should fail the wrong element name" do
|
773
|
+
# lambda {
|
774
|
+
# response.should have_rjs(:effect, :fade, 'wrongname')
|
775
|
+
# }.should raise_error(SpecFailed)
|
776
|
+
# end
|
777
|
+
#
|
778
|
+
# it "should fail with the correct element but the wrong command" do
|
779
|
+
# lambda {
|
780
|
+
# response.should have_rjs(:effect, :puff, 'mydiv')
|
781
|
+
# }.should raise_error(SpecFailed)
|
782
|
+
# end
|
783
|
+
#
|
784
|
+
# end
|
785
|
+
#
|
786
|
+
# describe "An rjs call to :visual_effect for a toggle, a 'should have_rjs' spec with",
|
787
|
+
# :type => :view do
|
788
|
+
#
|
789
|
+
# before do
|
790
|
+
# render 'rjs_spec/visual_toggle_effect'
|
791
|
+
# end
|
792
|
+
#
|
793
|
+
# it "should pass with the correct element name" do
|
794
|
+
# response.should have_rjs(:effect, :toggle_blind, 'mydiv')
|
795
|
+
# end
|
796
|
+
#
|
797
|
+
# it "should fail with the wrong element name" do
|
798
|
+
# lambda {
|
799
|
+
# response.should have_rjs(:effect, :toggle_blind, 'wrongname')
|
800
|
+
# }.should raise_error(SpecFailed)
|
801
|
+
# end
|
802
|
+
#
|
803
|
+
# it "should fail the correct element but the wrong command" do
|
804
|
+
# lambda {
|
805
|
+
# response.should have_rjs(:effect, :puff, 'mydiv')
|
806
|
+
# }.should raise_error(SpecFailed)
|
807
|
+
# end
|
808
|
+
#
|
809
|
+
# end
|
@@ -11,70 +11,77 @@ require File.dirname(__FILE__) + '/../../../spec_helper'
|
|
11
11
|
|
12
12
|
subject { send(subject_method) }
|
13
13
|
|
14
|
-
it "
|
14
|
+
it "matches an action (using a string)" do
|
15
15
|
post 'some_action'
|
16
16
|
should render_template('some_action')
|
17
17
|
end
|
18
18
|
|
19
|
-
|
19
|
+
if ::Rails::VERSION::STRING >= '2.3'
|
20
|
+
it "matches an action with specified extenstions" do
|
21
|
+
post 'some_action'
|
22
|
+
should render_template('some_action.html.erb')
|
23
|
+
end
|
24
|
+
end
|
25
|
+
|
26
|
+
it "matches an action (using a symbol)" do
|
27
|
+
post 'some_action'
|
28
|
+
should render_template(:some_action)
|
29
|
+
end
|
30
|
+
|
31
|
+
it "matches an action on a specific controller" do
|
20
32
|
post 'some_action'
|
21
33
|
should render_template('render_spec/some_action')
|
22
34
|
end
|
23
35
|
|
24
|
-
it "
|
36
|
+
it "matches an action on a non-default specific controller" do
|
25
37
|
post 'action_which_renders_template_from_other_controller'
|
26
38
|
should render_template('controller_spec/action_with_template')
|
27
39
|
end
|
28
40
|
|
29
|
-
it "
|
30
|
-
post 'some_action'
|
31
|
-
should render_template(:some_action)
|
32
|
-
end
|
33
|
-
|
34
|
-
it "should match an rjs template" do
|
41
|
+
it "matches an rjs template" do
|
35
42
|
xhr :post, 'some_action'
|
36
43
|
should render_template('render_spec/some_action')
|
37
44
|
end
|
38
45
|
|
39
|
-
it "
|
46
|
+
it "matches a partial template (simple path)" do
|
40
47
|
get 'action_with_partial'
|
41
48
|
should render_template("_a_partial")
|
42
49
|
end
|
43
50
|
|
44
|
-
it "
|
51
|
+
it "matches a partial template (complex path)" do
|
45
52
|
get 'action_with_partial'
|
46
53
|
should render_template("render_spec/_a_partial")
|
47
54
|
end
|
48
55
|
|
49
|
-
it "
|
56
|
+
it "fails when the wrong template is rendered" do
|
50
57
|
post 'some_action'
|
51
58
|
lambda do
|
52
59
|
should render_template('non_existent_template')
|
53
60
|
end.should fail_with(/expected \"non_existent_template\", got \"render_spec\/some_action(\.html\.erb)?\"/)
|
54
61
|
end
|
55
62
|
|
56
|
-
it "
|
63
|
+
it "fails when template is associated with a different controller but controller is not specified" do
|
57
64
|
post 'action_which_renders_template_from_other_controller'
|
58
65
|
lambda do
|
59
66
|
should render_template('action_with_template')
|
60
|
-
end.should fail_with(/expected \"action_with_template\", got \"controller_spec\/action_with_template(\.
|
67
|
+
end.should fail_with(/expected \"action_with_template\", got \"controller_spec\/action_with_template(\.html\.erb)?\"/)
|
61
68
|
end
|
62
69
|
|
63
|
-
it "
|
70
|
+
it "fails with incorrect full path when template is associated with a different controller" do
|
64
71
|
post 'action_which_renders_template_from_other_controller'
|
65
72
|
lambda do
|
66
73
|
should render_template('render_spec/action_with_template')
|
67
|
-
end.should fail_with(/expected \"render_spec\/action_with_template\", got \"controller_spec\/action_with_template(\.
|
74
|
+
end.should fail_with(/expected \"render_spec\/action_with_template\", got \"controller_spec\/action_with_template(\.html\.erb)?\"/)
|
68
75
|
end
|
69
76
|
|
70
|
-
it "
|
77
|
+
it "fails on the wrong extension" do
|
71
78
|
get 'some_action'
|
72
79
|
lambda {
|
73
|
-
should render_template('render_spec/some_action.rjs')
|
74
|
-
}.should fail_with(/expected \"render_spec\/some_action\.rjs\", got \"render_spec\/some_action(\.html\.erb)?\"/)
|
80
|
+
should render_template('render_spec/some_action.js.rjs')
|
81
|
+
}.should fail_with(/expected \"render_spec\/some_action\.js\.rjs\", got \"render_spec\/some_action(\.html\.erb)?\"/)
|
75
82
|
end
|
76
83
|
|
77
|
-
it "
|
84
|
+
it "faild when TEXT is rendered" do
|
78
85
|
post 'text_action'
|
79
86
|
lambda do
|
80
87
|
should render_template('some_action')
|
@@ -82,10 +89,11 @@ require File.dirname(__FILE__) + '/../../../spec_helper'
|
|
82
89
|
end
|
83
90
|
|
84
91
|
describe "with an alternate layout" do
|
85
|
-
|
86
|
-
|
87
|
-
|
88
|
-
|
92
|
+
it "says it rendered the action's layout" do
|
93
|
+
pending("record rendering of layouts") do
|
94
|
+
get 'action_with_alternate_layout'
|
95
|
+
should render_template('layouts/simple')
|
96
|
+
end
|
89
97
|
end
|
90
98
|
end
|
91
99
|
|
@@ -103,75 +111,75 @@ require File.dirname(__FILE__) + '/../../../spec_helper'
|
|
103
111
|
|
104
112
|
subject { send(subject_method) }
|
105
113
|
|
106
|
-
it "
|
114
|
+
it "passes when the action renders nothing" do
|
107
115
|
post 'action_that_renders_nothing'
|
108
116
|
should_not render_template('action_that_renders_nothing')
|
109
117
|
end
|
110
118
|
|
111
|
-
it "
|
119
|
+
it "passes when the action renders nothing (symbol)" do
|
112
120
|
post 'action_that_renders_nothing'
|
113
121
|
should_not render_template(:action_that_renders_nothing)
|
114
122
|
end
|
115
123
|
|
116
|
-
it "
|
124
|
+
it "passes when the action does not render the template" do
|
117
125
|
post 'some_action'
|
118
126
|
should_not render_template('some_other_template')
|
119
127
|
end
|
120
128
|
|
121
|
-
it "
|
129
|
+
it "passes when the action does not render the template (symbol)" do
|
122
130
|
post 'some_action'
|
123
131
|
should_not render_template(:some_other_template)
|
124
132
|
end
|
125
133
|
|
126
|
-
it "
|
134
|
+
it "passes when the action does not render the template (named with controller)" do
|
127
135
|
post 'some_action'
|
128
136
|
should_not render_template('render_spec/some_other_template')
|
129
137
|
end
|
130
138
|
|
131
|
-
it "
|
139
|
+
it "passes when the action renders the template with a different controller" do
|
132
140
|
post 'action_which_renders_template_from_other_controller'
|
133
141
|
should_not render_template('action_with_template')
|
134
142
|
end
|
135
143
|
|
136
|
-
it "
|
144
|
+
it "passes when the action renders the template (named with controller) with a different controller" do
|
137
145
|
post 'action_which_renders_template_from_other_controller'
|
138
146
|
should_not render_template('render_spec/action_with_template')
|
139
147
|
end
|
140
148
|
|
141
|
-
it "
|
149
|
+
it "passes when TEXT is rendered" do
|
142
150
|
post 'text_action'
|
143
151
|
should_not render_template('some_action')
|
144
152
|
end
|
145
153
|
|
146
|
-
it "
|
154
|
+
it "fails when the action renders the template" do
|
147
155
|
post 'some_action'
|
148
156
|
lambda do
|
149
157
|
should_not render_template('some_action')
|
150
158
|
end.should fail_with("expected not to render \"some_action\", but did")
|
151
159
|
end
|
152
160
|
|
153
|
-
it "
|
161
|
+
it "fails when the action renders the template (symbol)" do
|
154
162
|
post 'some_action'
|
155
163
|
lambda do
|
156
164
|
should_not render_template(:some_action)
|
157
165
|
end.should fail_with("expected not to render \"some_action\", but did")
|
158
166
|
end
|
159
167
|
|
160
|
-
it "
|
168
|
+
it "fails when the action renders the template (named with controller)" do
|
161
169
|
post 'some_action'
|
162
170
|
lambda do
|
163
171
|
should_not render_template('render_spec/some_action')
|
164
172
|
end.should fail_with("expected not to render \"render_spec/some_action\", but did")
|
165
173
|
end
|
166
174
|
|
167
|
-
it "
|
175
|
+
it "fails when the action renders the partial" do
|
168
176
|
post 'action_with_partial'
|
169
177
|
lambda do
|
170
178
|
should_not render_template('_a_partial')
|
171
179
|
end.should fail_with("expected not to render \"_a_partial\", but did")
|
172
180
|
end
|
173
181
|
|
174
|
-
it "
|
182
|
+
it "fails when the action renders the partial (named with controller)" do
|
175
183
|
post 'action_with_partial'
|
176
184
|
lambda do
|
177
185
|
should_not render_template('render_spec/_a_partial')
|
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.13
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- RSpec Development Team
|
@@ -9,7 +9,7 @@ autorequire:
|
|
9
9
|
bindir: bin
|
10
10
|
cert_chain: []
|
11
11
|
|
12
|
-
date: 2009-
|
12
|
+
date: 2009-03-09 00:00:00 -07:00
|
13
13
|
default_executable:
|
14
14
|
dependencies:
|
15
15
|
- !ruby/object:Gem::Dependency
|
@@ -20,7 +20,7 @@ dependencies:
|
|
20
20
|
requirements:
|
21
21
|
- - "="
|
22
22
|
- !ruby/object:Gem::Version
|
23
|
-
version: 1.1.99.
|
23
|
+
version: 1.1.99.13
|
24
24
|
version:
|
25
25
|
- !ruby/object:Gem::Dependency
|
26
26
|
name: rack
|
@@ -50,7 +50,7 @@ dependencies:
|
|
50
50
|
requirements:
|
51
51
|
- - ">="
|
52
52
|
- !ruby/object:Gem::Version
|
53
|
-
version: 1.
|
53
|
+
version: 1.9.0
|
54
54
|
version:
|
55
55
|
description: Behaviour Driven Development for Ruby on Rails.
|
56
56
|
email:
|
@@ -67,6 +67,7 @@ extra_rdoc_files:
|
|
67
67
|
- TODO.txt
|
68
68
|
- generators/rspec/templates/previous_failures.txt
|
69
69
|
files:
|
70
|
+
- .document
|
70
71
|
- History.txt
|
71
72
|
- License.txt
|
72
73
|
- Manifest.txt
|
@@ -116,6 +117,7 @@ files:
|
|
116
117
|
- lib/spec/rails/example/helper_example_group.rb
|
117
118
|
- lib/spec/rails/example/model_example_group.rb
|
118
119
|
- lib/spec/rails/example/render_observer.rb
|
120
|
+
- lib/spec/rails/example/routing_example_group.rb
|
119
121
|
- lib/spec/rails/example/routing_helpers.rb
|
120
122
|
- lib/spec/rails/example/view_example_group.rb
|
121
123
|
- lib/spec/rails/extensions.rb
|
@@ -146,6 +148,7 @@ files:
|
|
146
148
|
- spec/resources/controllers/action_view_base_spec_controller.rb
|
147
149
|
- spec/resources/controllers/application.rb
|
148
150
|
- spec/resources/controllers/controller_spec_controller.rb
|
151
|
+
- spec/resources/controllers/example.txt
|
149
152
|
- spec/resources/controllers/redirect_spec_controller.rb
|
150
153
|
- spec/resources/controllers/render_spec_controller.rb
|
151
154
|
- spec/resources/controllers/rjs_spec_controller.rb
|
@@ -157,49 +160,48 @@ files:
|
|
157
160
|
- spec/resources/models/animal.rb
|
158
161
|
- spec/resources/models/person.rb
|
159
162
|
- spec/resources/models/thing.rb
|
160
|
-
- spec/resources/views/controller_spec/_partial.
|
161
|
-
- spec/resources/views/controller_spec/action_setting_flash_after_session_reset.
|
162
|
-
- spec/resources/views/controller_spec/action_setting_flash_before_session_reset.
|
163
|
-
- spec/resources/views/controller_spec/action_setting_the_assigns_hash.
|
164
|
-
- spec/resources/views/controller_spec/action_with_errors_in_template.
|
165
|
-
- spec/resources/views/controller_spec/action_with_template.
|
166
|
-
- spec/resources/views/layouts/application.
|
167
|
-
- spec/resources/views/layouts/simple.
|
163
|
+
- spec/resources/views/controller_spec/_partial.html.erb
|
164
|
+
- spec/resources/views/controller_spec/action_setting_flash_after_session_reset.html.erb
|
165
|
+
- spec/resources/views/controller_spec/action_setting_flash_before_session_reset.html.erb
|
166
|
+
- spec/resources/views/controller_spec/action_setting_the_assigns_hash.html.erb
|
167
|
+
- spec/resources/views/controller_spec/action_with_errors_in_template.html.erb
|
168
|
+
- spec/resources/views/controller_spec/action_with_template.html.erb
|
169
|
+
- spec/resources/views/layouts/application.html.erb
|
170
|
+
- spec/resources/views/layouts/simple.html.erb
|
168
171
|
- spec/resources/views/objects/_object.html.erb
|
169
|
-
- spec/resources/views/render_spec/_a_partial.
|
170
|
-
- spec/resources/views/render_spec/action_with_alternate_layout.
|
172
|
+
- spec/resources/views/render_spec/_a_partial.html.erb
|
173
|
+
- spec/resources/views/render_spec/action_with_alternate_layout.html.erb
|
171
174
|
- spec/resources/views/render_spec/some_action.html.erb
|
172
175
|
- spec/resources/views/render_spec/some_action.js.rjs
|
173
|
-
- spec/resources/views/
|
174
|
-
- spec/resources/views/rjs_spec/
|
175
|
-
- spec/resources/views/rjs_spec/
|
176
|
-
- spec/resources/views/rjs_spec/
|
177
|
-
- spec/resources/views/rjs_spec/
|
178
|
-
- spec/resources/views/rjs_spec/
|
179
|
-
- spec/resources/views/rjs_spec/
|
180
|
-
- spec/resources/views/rjs_spec/
|
181
|
-
- spec/resources/views/rjs_spec/
|
182
|
-
- spec/resources/views/
|
183
|
-
- spec/resources/views/tag_spec/
|
184
|
-
- spec/resources/views/tag_spec/
|
185
|
-
- spec/resources/views/
|
186
|
-
- spec/resources/views/view_spec/
|
187
|
-
- spec/resources/views/view_spec/
|
188
|
-
- spec/resources/views/view_spec/
|
189
|
-
- spec/resources/views/view_spec/
|
190
|
-
- spec/resources/views/view_spec/
|
191
|
-
- spec/resources/views/view_spec/
|
192
|
-
- spec/resources/views/view_spec/
|
193
|
-
- spec/resources/views/view_spec/
|
194
|
-
- spec/resources/views/view_spec/
|
195
|
-
- spec/resources/views/view_spec/
|
196
|
-
- spec/resources/views/view_spec/
|
197
|
-
- spec/resources/views/view_spec/multiple_helpers.rhtml
|
176
|
+
- spec/resources/views/rjs_spec/_replacement_partial.html.erb
|
177
|
+
- spec/resources/views/rjs_spec/hide_div.js.rjs
|
178
|
+
- spec/resources/views/rjs_spec/hide_page_element.js.rjs
|
179
|
+
- spec/resources/views/rjs_spec/insert_html.js.rjs
|
180
|
+
- spec/resources/views/rjs_spec/replace.js.rjs
|
181
|
+
- spec/resources/views/rjs_spec/replace_html.js.rjs
|
182
|
+
- spec/resources/views/rjs_spec/replace_html_with_partial.js.rjs
|
183
|
+
- spec/resources/views/rjs_spec/visual_effect.js.rjs
|
184
|
+
- spec/resources/views/rjs_spec/visual_toggle_effect.js.rjs
|
185
|
+
- spec/resources/views/tag_spec/no_tags.html.erb
|
186
|
+
- spec/resources/views/tag_spec/single_div_with_no_attributes.html.erb
|
187
|
+
- spec/resources/views/tag_spec/single_div_with_one_attribute.html.erb
|
188
|
+
- spec/resources/views/view_spec/_partial.html.erb
|
189
|
+
- spec/resources/views/view_spec/_partial_used_twice.html.erb
|
190
|
+
- spec/resources/views/view_spec/_partial_with_local_variable.html.erb
|
191
|
+
- spec/resources/views/view_spec/_partial_with_sub_partial.html.erb
|
192
|
+
- spec/resources/views/view_spec/_spacer.html.erb
|
193
|
+
- spec/resources/views/view_spec/accessor.html.erb
|
194
|
+
- spec/resources/views/view_spec/block_helper.html.erb
|
195
|
+
- spec/resources/views/view_spec/entry_form.html.erb
|
196
|
+
- spec/resources/views/view_spec/explicit_helper.html.erb
|
197
|
+
- spec/resources/views/view_spec/foo/show.html.erb
|
198
|
+
- spec/resources/views/view_spec/implicit_helper.html.erb
|
199
|
+
- spec/resources/views/view_spec/multiple_helpers.html.erb
|
198
200
|
- spec/resources/views/view_spec/path_params.html.erb
|
199
|
-
- spec/resources/views/view_spec/should_not_receive.
|
200
|
-
- spec/resources/views/view_spec/template_with_partial.
|
201
|
-
- spec/resources/views/view_spec/template_with_partial_using_collection.
|
202
|
-
- spec/resources/views/view_spec/template_with_partial_with_array.
|
201
|
+
- spec/resources/views/view_spec/should_not_receive.html.erb
|
202
|
+
- spec/resources/views/view_spec/template_with_partial.html.erb
|
203
|
+
- spec/resources/views/view_spec/template_with_partial_using_collection.html.erb
|
204
|
+
- spec/resources/views/view_spec/template_with_partial_with_array.html.erb
|
203
205
|
- spec/spec/rails/example/assigns_hash_proxy_spec.rb
|
204
206
|
- spec/spec/rails/example/configuration_spec.rb
|
205
207
|
- spec/spec/rails/example/controller_example_group_spec.rb
|
@@ -209,7 +211,8 @@ files:
|
|
209
211
|
- spec/spec/rails/example/example_group_factory_spec.rb
|
210
212
|
- spec/spec/rails/example/helper_example_group_spec.rb
|
211
213
|
- spec/spec/rails/example/model_example_group_spec.rb
|
212
|
-
- spec/spec/rails/example/
|
214
|
+
- spec/spec/rails/example/routing_example_group_spec.rb
|
215
|
+
- spec/spec/rails/example/shared_routing_example_group_examples.rb
|
213
216
|
- spec/spec/rails/example/test_unit_assertion_accessibility_spec.rb
|
214
217
|
- spec/spec/rails/example/view_example_group_spec.rb
|
215
218
|
- spec/spec/rails/extensions/action_view_base_spec.rb
|
@@ -257,6 +260,6 @@ rubyforge_project: rspec
|
|
257
260
|
rubygems_version: 1.2.0
|
258
261
|
signing_key:
|
259
262
|
specification_version: 2
|
260
|
-
summary: rspec-rails 1.1.99.
|
263
|
+
summary: rspec-rails 1.1.99.13
|
261
264
|
test_files: []
|
262
265
|
|