spec/box/release/base_spec.rb in box-release-0.0.2 vs spec/box/release/base_spec.rb in box-release-0.0.3
- old
+ new
@@ -6,12 +6,23 @@
let(:update_tar) { File.expand_path "../../../fixtures/box-update-20100421-0846.tar", __FILE__ }
subject { Box::Release::Memory.new }
- its(:file) { should == "/tmp/release.tar" }
+ describe "#file" do
+
+ context "by default" do
+ its(:file) { should == "/tmp/release.tar" }
+ end
+
+ it "should use Box::Release.download_directory when defined" do
+ subject.stub :download_directory => "/dummy"
+ subject.file.should == "/dummy/release.tar"
+ end
+
+ end
- describe "download" do
+ describe "#download" do
before(:each) do
FileUtils.rm_f(subject.file)
end