From a47c6fea7a10505d97cfd3d54d758f49a4991d9c Mon Sep 17 00:00:00 2001 From: Andreas Stephanides Date: Mon, 14 Sep 2015 00:03:01 +0200 Subject: [PATCH] AutoCommit Mon Sep 14 00:03:01 CEST 2015 --- spec/factories/attachments.rb | 2 ++ spec/models/attachment_spec.rb | 5 +++++ spec/models/beispiel_spec.rb | 1 - 3 files changed, 7 insertions(+), 1 deletion(-) diff --git a/spec/factories/attachments.rb b/spec/factories/attachments.rb index 9c31968..4bec5f0 100644 --- a/spec/factories/attachments.rb +++ b/spec/factories/attachments.rb @@ -3,5 +3,7 @@ FactoryGirl.define do factory :attachment do name "MyString" + datei { Rack::Test::UploadedFile.new(File.join(Rails.root,'public','fetlogo.png'))} + flag_titlepic false end end diff --git a/spec/models/attachment_spec.rb b/spec/models/attachment_spec.rb index 9981316..0cfdd37 100644 --- a/spec/models/attachment_spec.rb +++ b/spec/models/attachment_spec.rb @@ -2,4 +2,9 @@ require 'spec_helper' describe Attachment do pending "add some examples to (or delete) #{__FILE__}" + let(:attachment) {FactoryGirl.build_stubbed(:attachment)} + it "responds to image" do + expect(attachment.respond_to?(:image?)).to be true + end + end diff --git a/spec/models/beispiel_spec.rb b/spec/models/beispiel_spec.rb index cf86e80..171456e 100644 --- a/spec/models/beispiel_spec.rb +++ b/spec/models/beispiel_spec.rb @@ -18,7 +18,6 @@ describe Beispiel, :type=>:model do let(:beispiel){FactoryGirl.build(:beispiel, lva: lva)} it "should be created" do - expect{beispiel.save!; Sunspot.commit}.to change{Beispiel.count}.by(1) end it "is not valid without lva" do