Module: Peto::RailsControllerTestHelper

Defined in:
lib/peto/rails/rails_controller_test_helper.rb

Instance Method Summary collapse

Instance Method Details

#assert_peto_response(except) ⇒ Object



12
13
14
# File 'lib/peto/rails/rails_controller_test_helper.rb', line 12

def assert_peto_response(except)
  assert_equal decoded_response["args"], except
end

#decoded_responseObject



8
9
10
# File 'lib/peto/rails/rails_controller_test_helper.rb', line 8

def decoded_response
  @decoded_response ||= ActiveSupport::JSON.decode(@response.body)
end

#peto_post(procedure, args) ⇒ Object



4
5
6
# File 'lib/peto/rails/rails_controller_test_helper.rb', line 4

def peto_post(procedure, args)
  post :index, {:procedure=>procedure.to_s, :args=>args}
end