Sha256: 3811e04a2380ffbcbd88435b989deb16c2cb354052abc421410b24c18fd26d86

Contents?: true

Size: 367 Bytes

Versions: 6

Compression:

Stored size: 367 Bytes

Contents

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

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

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


Version data entries

6 entries across 6 versions & 1 rubygems

Version Path
peto-0.2.7 lib/peto/rails/rails_controller_test_helper.rb
peto-0.2.6 lib/peto/rails/rails_controller_test_helper.rb
peto-0.2.5 lib/peto/rails/rails_controller_test_helper.rb
peto-0.2.4 lib/peto/rails/rails_controller_test_helper.rb
peto-0.2.3 lib/peto/rails/rails_controller_test_helper.rb
peto-0.2.2 lib/peto/rails/rails_controller_test_helper.rb