AutoCommit Son Aug 30 15:03:01 CEST 2015

This commit is contained in:
Andreas Stephanides
2015-08-30 15:03:01 +02:00
parent 5bf63421a6
commit 4a671f5cff
4 changed files with 62 additions and 19 deletions

View File

@@ -2,18 +2,22 @@ require 'spec_helper'
describe Lva do
pending "add some examples to (or delete) #{__FILE__}"
it "should be created" do
l=FactoryGirl.build(:lva)
mg=FactoryGirl.build(:modulgruppe)
before(:all) do
s=FactoryGirl.create(:studium)
mg=FactoryGirl.build(:modulgruppe)
mg.studium= s
mg.save!
m=FactoryGirl.build(:other_modul)
m.modulgruppe=mg
m.save!
l.modul= m
@m=FactoryGirl.build(:other_modul)
@m.modulgruppen << mg
@m.save!
puts "Beispiele before filter"
end
before(:each) do
@l = FactoryGirl.build(:lva)
end
it "should be created" do
l=FactoryGirl.build(:lva)
l.modul << @m
expect{l.save!; Sunspot.commit}.to change{Lva.count}.by(1)
end
it "should not be valid without module" do
@@ -21,6 +25,9 @@ describe Lva do
expect(l.valid?).to be false
expect(l.errors[:modul].size).to be(1)
end
it "should respond to semesters" do
@l
end
pending "should not be valid without modul"
pending "should have beispiele"
pending "should be flagable"