Sha256: 46531042c1a9e107d52e071eb80694607fc1c79ddc2b9c52f36aad9b51406189
Contents?: true
Size: 1.1 KB
Versions: 15
Compression:
Stored size: 1.1 KB
Contents
require 'spec_helper' module Server describe TimeEntry do describe "Attributes" do it { should respond_to :mtime } end describe "Validations" do it { should_not be_valid } it "should require an mtime" do t = FactoryGirl.build :time_entry, mtime: nil t.should_not be_valid end it "should require a hash" do m = FactoryGirl.build :time_entry, file_hash: nil m.should_not be_valid end it "should require an editor_name" do m = FactoryGirl.build :time_entry, editor_name: nil m.should_not be_valid end it "should require an editor_version" do m = FactoryGirl.build :time_entry, editor_version: nil m.should_not be_valid end it "should be valid if attributes requirements are met" do t = FactoryGirl.build :time_entry t.should be_valid end end describe "Associations" do it "should belong to a file" do f = FactoryGirl.create :file t = FactoryGirl.create :time_entry, file: f t.file.should == f end end end end
Version data entries
15 entries across 15 versions & 1 rubygems