[rspec-users] Control order of spec files for an integration test?

2011-02-12 Thread Wolfram Arnold, RubyFocus
Hi, I'm using RSpec2 with Capybara and Celerity for an integration test. I'd like to use some of the tests (e.g. user registration) to run as a prerequisite to other steps. I was hoping that by naming files in the correct alphabetical order, RSpec would run them in alphabetical order. RSpec 1.x

[rspec-users] [Cucumber] Successive requests with xml Content-Type fail?

2009-06-21 Thread Wolfram Arnold
I'm writing a cucumber test for an xml webservice. When making POST's the Content-Type in the header is set to "application/xml" and for any request, the Accept header is set to "application/xml" (aka Mime::XML.to_s) I'm running into the following issue: When I make two successive requests, the

Re: [rspec-users] Cucumber vs Rails Fixtures

2009-06-07 Thread Wolfram Arnold
Yi Wen wrote: > I do this: > > Fixtures.reset_cache > fixtures_folder = File.join(RAILS_ROOT, 'test', 'fixtures') > fixtures = Dir[File.join(fixtures_folder, '*.yml')].map {|f| > File.basename(f, '.yml') } > fixture_class_names = {} # or whatever needed > Fixtures.create_fixtures(fixtures_folder,

Re: [rspec-users] Cucumber vs Rails Fixtures

2009-06-05 Thread Wolfram Arnold
This still wasn't fully working; I posted too soon. See here for the final and working version: http://wiki.github.com/aslakhellesoy/cucumber/fixtures -- Posted via http://www.ruby-forum.com/. ___ rspec-users mailing list rspec-users@rubyforge.org htt

Re: [rspec-users] Cucumber vs Rails Fixtures

2009-06-05 Thread Wolfram Arnold
The method I posted last week only works for Cucumber prior to 0.2.3.2. For 0.2.3.2 and later, you cannot pass a block to the World more than once, and thus the new way would be (in env.rb): module FixtureAccess def self.included(base) (class << base; self; end).class_eval do @@fixt

Re: [rspec-users] Cucumber vs Rails Fixtures

2009-06-02 Thread Wolfram Arnold
I've updated http://wiki.github.com/aslakhellesoy/cucumber/fixtures accordingly. -- Posted via http://www.ruby-forum.com/. ___ rspec-users mailing list rspec-users@rubyforge.org http://rubyforge.org/mailman/listinfo/rspec-users

Re: [rspec-users] Cucumber vs Rails Fixtures

2009-06-02 Thread Wolfram Arnold
>> How do I actually use real, pre-existing Rails fixtures, the same as >> the unit tests use? For familiarity? What I was missing is the regular use of fixtures as in rspec or test unit, like so: u = users(:bob) u.email = "aaa" u.should_not be_valid This link > > http://wiki.github.com/aslak

Re: [rspec-users] [Cucumber] How can I pass an XML block as a parameter?

2009-04-15 Thread Wolfram Arnold
Thanks to all for the prompt answer and new docs!!! -- Posted via http://www.ruby-forum.com/. ___ rspec-users mailing list rspec-users@rubyforge.org http://rubyforge.org/mailman/listinfo/rspec-users

Re: [rspec-users] [Cucumber] How can I pass an XML block as a parameter?

2009-04-14 Thread Wolfram Arnold
Copy & paste mistake: We did escape the quotes inside the XML stanza, result is the same. -- Posted via http://www.ruby-forum.com/. ___ rspec-users mailing list rspec-users@rubyforge.org http://rubyforge.org/mailman/listinfo/rspec-users

[rspec-users] [Cucumber] How can I pass an XML block as a parameter?

2009-04-14 Thread Wolfram Arnold
We're trying to verify XML REST API's and would like to write Cucumber specs of the following type: Scenario: Create a phrase Given I have an authenticated session for user with login "steve" When I send a POST to /phrases with parameters: locale=ca and post body "