Sha256: 5b2c02b5bd05fd43c20a757de9638811c26127c5387a4d178e8d3e10672479c8
Contents?: true
Size: 688 Bytes
Versions: 2
Compression:
Stored size: 688 Bytes
Contents
require File.expand_path(File.dirname(__FILE__) + '/spec_helper') require 'validation' describe Validation, " when first created" do before do answer = mock("Answer", :id => 2, :parser => mock("Parser", :new_validation_id => 1)) answer.stub!(:class => Answer) args = [{:rule => "C", :message => "Please select a number between 0 and 120"}] options = {} @validation = Validation.new(answer, args, options) end it "should set initialization parameters properly" do @validation.id.should == 1 @validation.message.should == "Please select a number between 0 and 120" @validation.answer_id.should == 2 @validation.rule.should == "C" end end
Version data entries
2 entries across 2 versions & 1 rubygems
Version | Path |
---|---|
surveyor-0.9.1 | script/surveyor/specs/validation_spec.rb |
surveyor-0.9.0 | script/surveyor/specs/validation_spec.rb |