Skip to content

Commit

Permalink
Update metadata spec to cover nil keys
Browse files Browse the repository at this point in the history
  • Loading branch information
Robert May committed Nov 18, 2013
1 parent d15f690 commit 60ded33
Showing 1 changed file with 11 additions and 0 deletions.
11 changes: 11 additions & 0 deletions spec/models/metadata_spec.rb
Original file line number Diff line number Diff line change
Expand Up @@ -136,6 +136,17 @@
wibble_pt: 100
})
end

context "nil keys" do
let(:exif) { { nil => nil, "test" => 100 } }

it "returns an underscore-keyed array without the nil keys" do
hash = metadata.send(:fetch_from_exif, exif, [:test])
hash.should eq({
test: 100
})
end
end
end

describe "#rotate?" do
Expand Down

0 comments on commit 60ded33

Please sign in to comment.