search for: validate_numericality_of

Displaying 2 results from an estimated 2 matches for "validate_numericality_of".

2011 Sep 04
0
should validate_numericality_of with greater_than_or_equal_to
Hello, I have this in my spec it { should validate_numericality_of(:amount).greater_than_or_equal_to(0) } but I get error: Failure/Error: it { should validate_numericality_of(:amount).greater_than_or_equal_to(0) } NoMethodError: undefined method `greater_than_or_equal_to'' for #<RSpec::Matchers::Matcher:0xef23150> this page http://rema...
2013 Sep 07
0
[shoulda-matchers gem] validate_numericality_of_matcher strange behaviour
Hello I have Vacancy model and vacancy_spec test with validates_numericality_of :salary, greater_than: 1 in the model and validate_numericality_of(:salary).is_greater_than(2) in the _spec. When i run rspec spec command tests pass (in some cases and in other they don''t) Why? vacancy.rb ------------------------ class Vacancy < ActiveRecord::Base validates_presence_of :name, :salary, :position, :description, :company,...