Sha256: f9558ec5522d280e3f4c61ef2b3688cc4f25e2fc970e92457b56ab5db54af1f1
Contents?: true
Size: 494 Bytes
Versions: 7
Compression:
Stored size: 494 Bytes
Contents
require 'spec_helper' RSpec.describe "Span" do it "should be valid" do SpanModel.acts_as_span span_model = SpanModel.new(:start_date => nil, :end_date => nil) expect(span_model).to be_valid end it "should require a start_date before the end_date" do SpanModel.acts_as_span span_model = SpanModel.new(:start_date => Date.current, :end_date => Date.current - 1) expect(span_model).not_to be_valid expect(span_model.errors[:end_date].size).to eq(1) end end
Version data entries
7 entries across 7 versions & 1 rubygems