[rspec-users] RSpec and the Basecamp API

2008-01-31 Thread desaperados
I realise that this is kind of a basic question but I'm new to rspec and still trying to work out how to do things. I'm working on a rails project that requires basecamp integration via the api, which is fairly trivial to use via the basecamp.rb wrapper: Connection: basecamp =

Re: [rspec-users] RSpec and the Basecamp API

2008-01-31 Thread James Deville
basecamp = mock(basecamp api,;projects = whatever you expect to get from the projects call) Basecamp.stub!(:new).and_return(basecamp) So for the projects one, you could return an array, or a bunch of mocks, or a string. Just make it match how the Basecamp API is behaving. On Jan 31, 2008,