testing with external web services

I'm working on a new Rails project that has to integrate with an existing legacy billing system. The integration involves a read only web service to check authentication for the new site.

What I need to check is if the web service can or cannot be contacted, as different bits of code are run depending on whether the connection can be made or not. Basically, if a connection cannot be made to the web service, the Rails app will fall back and use a table in the project database rather than the data from the web service.

I need to test both conditions, but as is, I can either contact the web service or I can't, so I'm only testing one of the two conditions.

I'm aware of flexmock, but not sure if it's what need to look at.

That's a bit abbreviated, but I hope is enough to go on...

Thanks,