spec/nakal/android/screen_spec.rb in nakal-0.0.5 vs spec/nakal/android/screen_spec.rb in nakal-0.0.6
- old
+ new
@@ -3,11 +3,11 @@
`rm -rf spec/resources/droid`
Nakal.platform = :android
Nakal.directory= "spec/resources/droid"
Nakal.device_name = "samsung_galaxy_s3"
-Nakal.create_image_dir
+Nakal.create_image_dir "xx"
module Nakal::Android
class Screen
def capture
`cp spec/resources/*.png #{Nakal.image_location}`
@@ -60,12 +60,12 @@
it "can create,save and delete a screen using image object" do
Nakal.default_crop_params = {"samsung_galaxy_s3" => {"top" => 450, "right" => 180, "left" => 12, "bottom" => 15}}
image = @screen.strip
new_screen = Nakal::Android::Screen.new("new_home_screen", nil, image)
new_screen.save
- expect(File.exist?('./spec/resources/droid/samsung_galaxy_s3/new_home_screen.png')).to eq true
+ expect(File.exist?("#{Nakal.image_location}/new_home_screen.png")).to eq true
new_screen.delete!
- expect(File.exist?('./spec/resources/droid/samsung_galaxy_s3/new_home_screen.png')).to eq false
+ expect(File.exist?("#{Nakal.image_location}/new_home_screen.png")).to eq false
end
end
describe "#compare" do
it "compares two screens" do
\ No newline at end of file