Sha256: b462978c8cbfab874343c88f18bedaa5ed4f7768f0a961df053bbee9e7d7132f
Contents?: true
Size: 566 Bytes
Versions: 2
Compression:
Stored size: 566 Bytes
Contents
require 'spec_helper' require 'salary' describe Salary do before do @salary = Salary.new end it "salary should not be valid if maximum salary is less than minimum salary" do @salary.minimum = 10000 @salary.maximum = 5000 @salary.should_not be_valid @salary.errors.messages[:maximum].should_not be_blank end it "salary should be valid if maximum salary is >= than minimum salary" do @salary.minimum = 10000 @salary.maximum = 10000 @salary.should be_valid @salary.maximum = 10001 @salary.should be_valid end end
Version data entries
2 entries across 2 versions & 1 rubygems
Version | Path |
---|---|
min_max_validator-0.0.2 | spec/min_max_validator_spec.rb |
min_max_validator-0.0.1 | spec/min_max_validator_spec.rb |