Skip to content

Commit

Permalink
Trying hard to make this be in accord with the codeclimate
Browse files Browse the repository at this point in the history
  • Loading branch information
GabrielDVpereira committed Sep 23, 2018
1 parent 1c3d55e commit bfe5884
Showing 1 changed file with 9 additions and 5 deletions.
14 changes: 9 additions & 5 deletions indicaAi/spec/models/local_rating_spec.rb
Original file line number Diff line number Diff line change
Expand Up @@ -2,12 +2,16 @@

RSpec.describe LocalRating, type: :model do
it { should validate_numericality_of(:value).is_greater_than_or_equal_to(0) }
context 'ratings validation tests' do
it 'should return a integer value' do
note = create(:local_rating)
assert note.value.class == Integer
end

describe 'testing validations' do
context 'ratings validation tests' do
let!(:note) { create(:local_rating) }
it 'should return a integer value' do
note.save
# note = create(:local_rating)
assert note.value.class == Integer
end
end
it 'should return a integer though a float was given' do
note2 = LocalRating.new
note2.value = 3.4
Expand Down

0 comments on commit bfe5884

Please sign in to comment.