spec/dragonfly/temp_object_spec.rb in dragonfly-1.0.7 vs spec/dragonfly/temp_object_spec.rb in dragonfly-1.0.8

- old
+ new

@@ -116,11 +116,11 @@ after(:each) do FileUtils.rm_f(@filename) if File.exists?(@filename) end it "should write to a file" do @temp_object.to_file(@filename) - File.exists?(@filename).should be_true + File.exists?(@filename).should be_truthy end it "should write the correct data to the file" do @temp_object.to_file(@filename) File.read(@filename).should == 'HELLO' end @@ -138,11 +138,11 @@ File::Stat.new(@filename).mode.to_s(8).should =~ /755$/ end it "should create intermediate subdirs" do filename = 'tmp/gog/mcgee' @temp_object.to_file(filename) - File.exists?(filename).should be_true + File.exists?(filename).should be_truthy FileUtils.rm_rf('tmp/gog') end it "should allow not creating intermediate subdirs" do filename = 'tmp/gog/mcgee' expect{ @temp_object.to_file(filename, :mkdirs => false) }.to raise_error() @@ -209,13 +209,13 @@ end it "should delete its internal tempfile on close" do temp_object = new_temp_object("HELLO") path = temp_object.path - File.exist?(path).should be_true + File.exist?(path).should be_truthy temp_object.close - File.exist?(path).should be_false + File.exist?(path).should be_falsey end end describe "initializing from a tempfile" do @@ -238,13 +238,13 @@ end it "should delete its internal tempfile on close" do temp_object = new_temp_object("HELLO") path = temp_object.path - File.exist?(path).should be_true + File.exist?(path).should be_truthy temp_object.close - File.exist?(path).should be_false + File.exist?(path).should be_falsey end end describe "initializing from a file" do @@ -279,11 +279,11 @@ end it "doesn't remove the file on close" do temp_object = new_temp_object("HELLO") temp_object.close - File.exist?(temp_object.path).should be_true + File.exist?(temp_object.path).should be_truthy end end describe "initializing from a pathname" do @@ -317,10 +317,10 @@ end it "doesn't remove the file on close" do temp_object = new_temp_object("HELLO") temp_object.close - File.exist?(temp_object.path).should be_true + File.exist?(temp_object.path).should be_truthy end end describe "initializing from another temp object" do