forked from Sutto/rocket_pants
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request Sutto#53 from keithpitt/fix-testcase-for-rails-4
Fixed TestHelper for Rails 4
- Loading branch information
Showing
4 changed files
with
45 additions
and
6 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Original file line | Diff line number | Diff line change |
---|---|---|---|
@@ -0,0 +1,29 @@ | |||
require 'spec_helper' | |||
|
|||
describe TestController, 'rspec integration', :integration => true, :target => 'rspec' do | |||
# Hack to allow us to include the ActionController::TestCase::Behaviour module | |||
def self.setup(*args); end | |||
def self.teardown(*args); end | |||
|
|||
# Important to include behaviour before the RocketPants::TestHelpers | |||
include ActionController::TestCase::Behavior | |||
include RocketPants::TestHelper | |||
include RocketPants::RSpecMatchers | |||
|
|||
default_version 1 | |||
|
|||
before do | |||
@routes = TestRouter | |||
@controller = TestController.new | |||
@request = ActionController::TestRequest.new | |||
@response = ActionController::TestResponse.new | |||
end | |||
|
|||
describe 'should have_exposed' do | |||
it "allows you to asset what should have been exposed by an action" do | |||
get :echo, :echo => "ping" | |||
|
|||
response.should have_exposed(:echo => "ping") | |||
end | |||
end | |||
end |