21 lines
504 B
Ruby
21 lines
504 B
Ruby
require 'spec_helper'
|
|
|
|
describe Beispiel do
|
|
|
|
it "should be created" do
|
|
b=FactoryGirl.build(:beispiel)
|
|
l=FactoryGirl.create(:lva)
|
|
b.lva=l
|
|
expect{b.save!; Sunspot.commit}.to change{Beispiel.count}.by(1)
|
|
end
|
|
it "should not be valid without lva" do
|
|
b=FactoryGirl.build(:beispiel)
|
|
expect(b.valid?).to be false
|
|
end
|
|
it "shout respond to comments" do
|
|
b=FactoryGirl.create(:beispiel)
|
|
expect(b.responds_to?(:comments)).to be true
|
|
end
|
|
pending "should be flagable"
|
|
end
|