Skip to content

Commit

Permalink
add test for blank?
Browse files Browse the repository at this point in the history
  • Loading branch information
msimonborg committed May 10, 2017
1 parent 95f4f18 commit 996beaa
Showing 1 changed file with 9 additions and 1 deletion.
10 changes: 9 additions & 1 deletion spec/services/coordinates_spec.rb
Original file line number Diff line number Diff line change
Expand Up @@ -54,12 +54,20 @@
expect([coord[0], coord[1]]).to eq(coord.latlon)
end

it '#empty? and #blank? return true when the latlon array is empty' do
it '#empty? returns true when the latlon array is empty' do
expect(coord.empty?).to be(false)

coord.instance_variable_set(:@latlon, [])

expect(coord.empty?).to be(true)
end

it '#blank? returns true when the latlon array is blank' do
expect(coord.blank?).to be(false)

coord.instance_variable_set(:@latlon, '')

expect(coord.blank?).to be(true)
end
end
end

0 comments on commit 996beaa

Please sign in to comment.