picasa 0.6.3 → 0.6.4

Sign up to get free protection for your applications and to get access to all the features.
@@ -8,22 +8,34 @@ describe Picasa::File do
8
8
  end
9
9
 
10
10
  it "it returns file name" do
11
- file = Picasa::File.new(image_path("lena.jpg"))
11
+ file = Picasa::File.new(fixture_path("lena.jpg"))
12
12
  assert_equal "lena", file.name
13
13
  end
14
14
 
15
15
  it "it returns file extension" do
16
- file = Picasa::File.new(image_path("lena.jpg"))
16
+ file = Picasa::File.new(fixture_path("lena.jpg"))
17
17
  assert_equal "jpg", file.extension
18
18
  end
19
19
 
20
20
  it "it guesses content type" do
21
- file = Picasa::File.new(image_path("lena.jpg"))
21
+ file = Picasa::File.new(fixture_path("lena.jpg"))
22
22
  assert_equal "image/jpeg", file.content_type
23
23
  end
24
24
 
25
+ it "it returns content type of video file" do
26
+ file = Picasa::File.new(fixture_path("sample.3gp"))
27
+ assert_equal "video/3gpp", file.content_type
28
+ end
29
+
25
30
  it "returns binary read file" do
26
- file = Picasa::File.new(image_path("lena.jpg"))
31
+ file = Picasa::File.new(fixture_path("lena.jpg"))
27
32
  assert_equal String, file.binary.class
28
33
  end
34
+
35
+ it "raises error when content type not known" do
36
+ file = Picasa::File.new(fixture_path("sample.txt"))
37
+ assert_raises(Picasa::UnknownContentType) do
38
+ file.content_type
39
+ end
40
+ end
29
41
  end
Binary file
@@ -0,0 +1 @@
1
+ test
@@ -26,7 +26,7 @@ class MiniTest::Unit::TestCase
26
26
  WebMock.disable_net_connect!
27
27
  end
28
28
 
29
- def image_path(filename)
29
+ def fixture_path(filename)
30
30
  File.join("test", "fixtures", filename)
31
31
  end
32
32
 
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: picasa
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.6.3
4
+ version: 0.6.4
5
5
  prerelease:
6
6
  platform: ruby
7
7
  authors:
@@ -9,7 +9,7 @@ authors:
9
9
  autorequire:
10
10
  bindir: bin
11
11
  cert_chain: []
12
- date: 2013-01-07 00:00:00.000000000 Z
12
+ date: 2013-02-03 00:00:00.000000000 Z
13
13
  dependencies:
14
14
  - !ruby/object:Gem::Dependency
15
15
  name: httparty
@@ -149,10 +149,13 @@ files:
149
149
  - test/cassettes/tag-create.yml
150
150
  - test/cassettes/tag-destroy.yml
151
151
  - test/cassettes/tag-list.yml
152
+ - test/cassettes/video-create.yml
152
153
  - test/client_test.rb
153
154
  - test/connection_test.rb
154
155
  - test/file_test.rb
155
156
  - test/fixtures/lena.jpg
157
+ - test/fixtures/sample.3gp
158
+ - test/fixtures/sample.txt
156
159
  - test/helper.rb
157
160
  - test/template_test.rb
158
161
  - test/utils_test.rb
@@ -177,7 +180,7 @@ required_rubygems_version: !ruby/object:Gem::Requirement
177
180
  version: '0'
178
181
  requirements: []
179
182
  rubyforge_project:
180
- rubygems_version: 1.8.24
183
+ rubygems_version: 1.8.25
181
184
  signing_key:
182
185
  specification_version: 3
183
186
  summary: Simple Google Picasa managment