Modify box download test to pass properly on non-windows machines

This commit is contained in:
Mitchell Hashimoto 2010-04-02 13:49:47 -07:00
parent bd69c54379
commit de4442fc77
1 changed files with 6 additions and 3 deletions

View File

@ -107,6 +107,9 @@ class DownloadBoxActionTest < Test::Unit::TestCase
context "file options" do
should "include add binary bit to options on windows platform" do
# This constant is not defined on non-windows platforms, so define it here
File::BINARY = 4096 unless defined?(File::BINARY)
Mario::Platform.expects(:windows?).returns(true)
assert_equal @action.file_options, File::CREAT|File::EXCL|File::WRONLY|File::BINARY
end