Skip to content

Commit

Permalink
Making a test case for checking order of action_responses
Browse files Browse the repository at this point in the history
  • Loading branch information
ianwhite committed Apr 30, 2008
1 parent 41b2cc1 commit a1b6ffd
Show file tree
Hide file tree
Showing 2 changed files with 37 additions and 40 deletions.
40 changes: 0 additions & 40 deletions spec/controllers/default_respond_to_behaviour_spec.rb

This file was deleted.

37 changes: 37 additions & 0 deletions spec/controllers/inerited_controllers_spec.rb
@@ -0,0 +1,37 @@
require File.expand_path(File.join(File.dirname(__FILE__), '../spec_helper'))
require File.expand_path(File.join(File.dirname(__FILE__), '../app'))

class FooAController < FooController
response_for :foo do |format|
format.html { a }
end
end

class FooBController < FooAController
response_for :foo do |format|
format.html { b }
end
end

describe FooAController do
before do
@controller.stub!(:a)
end

it "get :foo should call :b" do
@controller.should_receive(:a)
get :foo
end
end

describe FooBController do
before do
@controller.stub!(:b)
end

it "get :foo should call :b" do
@controller.should_receive(:b)
get :foo
end
end

0 comments on commit a1b6ffd

Please sign in to comment.