require 'spec_helper'

describe Lva, :type=>:model do
  pending "add some examples to (or delete) #{__FILE__}"
  let_studium_lva
  before(:each) do 
    @l = FactoryGirl.build(:lva)
  end
  describe "if bare"  do
    let(:lva) {FactoryGirl.build(:lva)}
    it "should be created" do
      l=lva
      l.modul << modul
      expect{l.save!; Sunspot.commit}.to change{Lva.count}.by(1)
    end
    it "should not be valid without module" do
      l=lva
      expect(l.valid?).to be false
      expect(l.errors[:modul].size).to be(1)
    end
  end
  it "should respond to semesters" do
    expect(lva.respond_to?(:semester)).to be true
  end
  pending "should not be valid without modul"
  pending "should have beispiele"
  pending "should be flagable"
end
