I'm developing a tool that accesses SVN by running the command line SVN to get info and export.
I'd like to write some Cucumber features so I don't have to keep manually testing but I'd like to mock out the SVN accesses.
Should I switch to using a Ruby SVN library and if so, which one?
Or is there a fake svn.exe that will provide programmable responses?
EDIT:
The tool takes a file path, finds the revision of parent URL a few levels up, then exports a bunch of files and folders at that revision into a new directory. I'd like to write something like:
Given the file "extra1.txt" contains:
"""
extra1
"""
And the file "file.txt" contains:
"""
file
"""
And SVN holds the following files at revisions:
| tests/extras/extra1.txt | 123 | extra1.txt |
| tests/path/part05/file.txt | 73 | file.txt |
When I run "ruby dry_run_create c:\tests\path\part05\file.txt"
Then the file "c:\tests\path\part05\dry_run\extra1.txt" should contain:
"""
extra1
"""
And the file "c:\tests\path\part05\dry_run\file.txt" should contain:
"""
file
"""
With examples like these I could demonstrate forever more that the correct revisions were being extracted from SVN without having to actually create a repository.