test/test_case_test.rb in roar-rails-0.0.1 vs test/test_case_test.rb in roar-rails-0.0.2
- old
+ new
@@ -1,12 +1,7 @@
require 'test_helper'
-ENV['RAILS_ENV'] = 'test'
-require "dummy/config/environment"
-require "rails/test_help" # adds stuff like @routes, etc.
-require "roar/rails/test_case"
-
class TestCaseTest < ActionController::TestCase
include Roar::Rails::TestCase
class BandController < ActionController::Base
def show
@@ -18,9 +13,14 @@
tests BandController
test "allows POST without body" do
post :show
assert_equal "", response.body
+ end
+
+ test "allows POST with options, only" do
+ post :show, :id => 1
+ assert_equal "1", response.body
end
test "allows POST with document" do
post :show, "{}"
assert_equal "{}", response.body