spec/album_spec.rb in picturama-0.0.1 vs spec/album_spec.rb in picturama-0.0.2
- old
+ new
@@ -1,6 +1,6 @@
-require_relative '../lib/picturama'
+require_relative 'spec_helper'
describe "For a given folder" do
before :each do
@target_exists_folder = "#{Dir.pwd}/spec/pictures"
@@ -26,9 +26,17 @@
@album.count_pictures.should > 0
end
it "gets all the albums in a given folder" do
Picturama::albums(File.dirname(@target_exists_folder)).size.should > 0
+ end
+
+ it "verifies the album name is correct based on folder name" do
+ expected_album_name = "dummy album"
+ expected_album_folder = "dummy-album"
+ Picturama::albums(@target_exists_folder).first.name.should == expected_album_name
+ Picturama::albums(@target_exists_folder).first.folder.should == expected_album_folder
+ Picturama::albums(@target_exists_folder).first.slug.should == expected_album_folder
end
end
\ No newline at end of file