PUT- or POST-ing xml

I’d like to write a test of a REST service wherein XML is submitted as
the
request entity.

In Test::Unit on Rails, this seems to be possible in an integration
test,
but not in a functional test. RSpec uses the Rails functional test
framework, as far as I can tell, so it suffers the same result; it tries
to
symbolize the keys of the ‘parameters’ hash, except the parameters
aren’t a
hash:

instance_eval'each’
/usr/lib/ruby/gems/1.8/gems/rspec-1.0.8/lib/spec/runner/command_line.rb:17:in
run' /usr/lib/ruby/gems/1.8/gems/rspec-1.0.8/bin/spec:3: /usr/bin/spec:16:inload’
/usr/bin/spec:16:

Finished in 0.594615 seconds

Thoughts? Has anyone found a way around this with the current (1.0.8)
RSpec? Is this something that is addressed by the Story Runner in
trunk?

Thanks in advance for any advice,

  • Geoffrey

On 10/4/07, Geoffrey W. [email protected] wrote:

NoMethodError in ‘Assign Roles to Users should assign a single role’
./spec/controllers/assign_role_to_users_spec.rb:42:
/usr/lib/ruby/gems/1.8/gems/rspec-1.0.8/lib/spec/dsl/example.rb:24:in
1.0.8/lib/spec/runner/behaviour_runner.rb:58:in

/usr/lib/ruby/gems/1.8/gems/rspec-1.0.8/lib/spec/runner/command_line.rb:17:in
`run’

/usr/lib/ruby/gems/1.8/gems/rspec- 1.0.8/bin/spec:3:
/usr/bin/spec:16:in `load’
/usr/bin/spec:16:

Finished in 0.594615 seconds

Thoughts? Has anyone found a way around this with the current (1.0.8)
RSpec? Is this something that is addressed by the Story Runner in trunk?

Story/Scenario Runner is indeed your solution. For Rails apps it wraps
rails integration tests.