Ben Brinckerhoff
33p39 comments posted · 1 followers · following 0
4 weeks ago @ The Devver Blog - Shutting down the Devv... · 0 replies · +1 points
4 weeks ago @ The Devver Blog - Shutting down the Devv... · 0 replies · +1 points
10 weeks ago @ The Devver Blog - Announcing Caliper Com... · 0 replies · +1 points
Unfortunately, neither of those features are available right now, but I'll make a story for each one. Thanks for the great suggestions!
Ben
10 weeks ago @ The Devver Blog - Announcing Caliper Com... · 0 replies · +1 points
It's a good question. Right now, forks are double (or triple, etc) counted. That's clearly not ideal. I'll have to think about it more, but my first thought is to aggregate the stats as a group for the purpose of community metrics. I'll make a story to look into this.
Thanks!
Ben
23 weeks ago @ The Devver Blog - Unit Testing Filesyste... · 0 replies · +1 points
Good questions.
1. We wanted to change the working directory (to the temp dir we've created) because then code like this works as expected:
within_construct |c|
c.file('foo.txt')
assert File.exist?('foo.txt')
end
But if you don't want to change the working dir (and I have several tests that don't, because of the problems you mentioned), you can pass 'false' to 'within_construct', like this:
within_construct(false) do |c|
c.file('foo.txt')
assert File.exist?(c+'foo.txt')
end
As for operations that test the full path, I'd recommend a solution like FakeFS, because Construct won't work for this scenario (it simply creates all files in a temp dir and then deletes that temp dir).
It certainly would be possible to have a different mode that writes files anywhere, but as you noted, we'd have to be really careful about not overwriting existing files, deleting files correctly, etc. I think in general, it's better to write methods that don't depend on full paths (for testability).
2. Frankly, this is only because I personally think setup/teardown methods are evil (Avdi is slowly starting to convince me it might not be so bad in a system like RSpec that has contexts, but I'm still skeptical). Of course, that's just me. I'll make a ticket to add methods like 'start' and 'stop' that would allow people to use construct in setup/teardown methods.
23 weeks ago @ The Devver Blog - Unit Testing Filesyste... · 0 replies · +1 points
23 weeks ago @ The Devver Blog - Unit Testing Filesyste... · 0 replies · +1 points
23 weeks ago @ The Devver Blog - Unit Testing Filesyste... · 0 replies · +1 points
Definitely feel free to contact me with any questions when you do the port to .NET.
23 weeks ago @ The Devver Blog - Unit Testing Filesyste... · 0 replies · +1 points
23 weeks ago @ The Devver Blog - Devver is now in publi... · 0 replies · +1 points
Creation