Skip to content

Commit

Permalink
Fixed target edge specs
Browse files Browse the repository at this point in the history
  • Loading branch information
ianwhite committed Apr 30, 2008
1 parent a1b6ffd commit 916536f
Show file tree
Hide file tree
Showing 3 changed files with 3 additions and 17 deletions.
6 changes: 3 additions & 3 deletions lib/ardes/response_for.rb
Expand Up @@ -137,13 +137,13 @@ def respond_to_with_response_for(*types, &block)
return respond_to_without_response_for(*types, &block) if options[:exclusive] || @running_before_filters

respond_to_without_response_for do |responder|
if action_blocks = self.class.send(:action_responses)[action_name]
action_blocks.reverse.each {|b| instance_exec(responder, &b)}
end
unless self.class.send(:respond_to_replaced)[action_name]
types.each {|type| responder.send(type)}
block.call(responder) if block
end
if action_blocks = self.class.send(:action_responses)[action_name]
action_blocks.each {|b| instance_exec(responder, &b)}
end
end
ensure
@performed_respond_to = true
Expand Down
6 changes: 0 additions & 6 deletions spec/controllers/inline_xml_foo_controller_spec.rb
Expand Up @@ -6,12 +6,6 @@
controller.stub!(:xml_call).and_return('XML')
end

it "get :foo should render text/html 'foo'" do
get :foo
response.should render_template(:foo)
response.content_type.should == 'text/html'
end

it "get :foo should assign @foo" do
get :foo
assigns[:foo].should == 'Foo'
Expand Down
8 changes: 0 additions & 8 deletions spec/controllers/xml_foo_controller_spec.rb
Expand Up @@ -28,12 +28,4 @@
response.should render_template(:bar)
response.content_type.should == 'application/xml'
end

it "get :just_a_template, :format => 'xml' should render just_a_template" do
@controller.stub!(:template_exists?).and_return(true)
@controller.stub!(:template_public?).and_return(true)
get :just_a_template, :format => 'xml'
response.should render_template(:just_a_template)
response.content_type.should == 'application/xml'
end
end

0 comments on commit 916536f

Please sign in to comment.