+
+
+<%= link_to 'Edit', edit_fetmeetingtop_path(@fetmeetingtop) %> |
+<%= link_to 'Back', fetmeetingtops_path %>
diff --git a/config/routes.rb b/config/routes.rb
index 404b381..74b381d 100755
--- a/config/routes.rb
+++ b/config/routes.rb
@@ -1,4 +1,10 @@
Fetsite::Application.routes.draw do
+ resources :fetmeetingtops
+
+
+ resources :fetmeetings
+
+
themes_for_rails
devise_for :users, :controllers => { :omniauth_callbacks => "users/omniauth_callbacks" }
resources :home, :only=>[:index] do
diff --git a/db/migrate/20140507125633_create_fetmeetings.rb b/db/migrate/20140507125633_create_fetmeetings.rb
new file mode 100644
index 0000000..cea9fef
--- /dev/null
+++ b/db/migrate/20140507125633_create_fetmeetings.rb
@@ -0,0 +1,10 @@
+class CreateFetmeetings < ActiveRecord::Migration
+ def change
+ create_table :fetmeetings do |t|
+ t.text :tnlist
+ t.integer :typ
+
+ t.timestamps
+ end
+ end
+end
diff --git a/db/migrate/20140507130354_create_fetmeetingtops.rb b/db/migrate/20140507130354_create_fetmeetingtops.rb
new file mode 100644
index 0000000..810e5ce
--- /dev/null
+++ b/db/migrate/20140507130354_create_fetmeetingtops.rb
@@ -0,0 +1,13 @@
+class CreateFetmeetingtops < ActiveRecord::Migration
+ def change
+ create_table :fetmeetingtops do |t|
+ t.string :title
+ t.text :text
+ t.text :discussion
+ t.string :ersteller
+ t.integer :fetmeeting_id
+
+ t.timestamps
+ end
+ end
+end
diff --git a/spec/controllers/fetmeetings_controller_spec.rb b/spec/controllers/fetmeetings_controller_spec.rb
new file mode 100644
index 0000000..2467093
--- /dev/null
+++ b/spec/controllers/fetmeetings_controller_spec.rb
@@ -0,0 +1,160 @@
+require 'spec_helper'
+
+# This spec was generated by rspec-rails when you ran the scaffold generator.
+# It demonstrates how one might use RSpec to specify the controller code that
+# was generated by Rails when you ran the scaffold generator.
+#
+# It assumes that the implementation code is generated by the rails scaffold
+# generator. If you are using any extension libraries to generate different
+# controller code, this generated spec may or may not pass.
+#
+# It only uses APIs available in rails and/or rspec-rails. There are a number
+# of tools you can use to make these specs even more expressive, but we're
+# sticking to rails and rspec-rails APIs to keep things simple and stable.
+#
+# Compared to earlier versions of this generator, there is very limited use of
+# stubs and message expectations in this spec. Stubs are only used when there
+# is no simpler way to get a handle on the object needed for the example.
+# Message expectations are only used when there is no simpler way to specify
+# that an instance is receiving a specific message.
+
+describe FetmeetingsController do
+
+ # This should return the minimal set of attributes required to create a valid
+ # Fetmeeting. As you add validations to Fetmeeting, be sure to
+ # adjust the attributes here as well.
+ let(:valid_attributes) { { "tnlist" => "MyText" } }
+
+ # This should return the minimal set of values that should be in the session
+ # in order to pass any filters (e.g. authentication) defined in
+ # FetmeetingsController. Be sure to keep this updated too.
+ let(:valid_session) { {} }
+
+ describe "GET index" do
+ it "assigns all fetmeetings as @fetmeetings" do
+ fetmeeting = Fetmeeting.create! valid_attributes
+ get :index, {}, valid_session
+ assigns(:fetmeetings).should eq([fetmeeting])
+ end
+ end
+
+ describe "GET show" do
+ it "assigns the requested fetmeeting as @fetmeeting" do
+ fetmeeting = Fetmeeting.create! valid_attributes
+ get :show, {:id => fetmeeting.to_param}, valid_session
+ assigns(:fetmeeting).should eq(fetmeeting)
+ end
+ end
+
+ describe "GET new" do
+ it "assigns a new fetmeeting as @fetmeeting" do
+ get :new, {}, valid_session
+ assigns(:fetmeeting).should be_a_new(Fetmeeting)
+ end
+ end
+
+ describe "GET edit" do
+ it "assigns the requested fetmeeting as @fetmeeting" do
+ fetmeeting = Fetmeeting.create! valid_attributes
+ get :edit, {:id => fetmeeting.to_param}, valid_session
+ assigns(:fetmeeting).should eq(fetmeeting)
+ end
+ end
+
+ describe "POST create" do
+ describe "with valid params" do
+ it "creates a new Fetmeeting" do
+ expect {
+ post :create, {:fetmeeting => valid_attributes}, valid_session
+ }.to change(Fetmeeting, :count).by(1)
+ end
+
+ it "assigns a newly created fetmeeting as @fetmeeting" do
+ post :create, {:fetmeeting => valid_attributes}, valid_session
+ assigns(:fetmeeting).should be_a(Fetmeeting)
+ assigns(:fetmeeting).should be_persisted
+ end
+
+ it "redirects to the created fetmeeting" do
+ post :create, {:fetmeeting => valid_attributes}, valid_session
+ response.should redirect_to(Fetmeeting.last)
+ end
+ end
+
+ describe "with invalid params" do
+ it "assigns a newly created but unsaved fetmeeting as @fetmeeting" do
+ # Trigger the behavior that occurs when invalid params are submitted
+ Fetmeeting.any_instance.stub(:save).and_return(false)
+ post :create, {:fetmeeting => { "tnlist" => "invalid value" }}, valid_session
+ assigns(:fetmeeting).should be_a_new(Fetmeeting)
+ end
+
+ it "re-renders the 'new' template" do
+ # Trigger the behavior that occurs when invalid params are submitted
+ Fetmeeting.any_instance.stub(:save).and_return(false)
+ post :create, {:fetmeeting => { "tnlist" => "invalid value" }}, valid_session
+ response.should render_template("new")
+ end
+ end
+ end
+
+ describe "PUT update" do
+ describe "with valid params" do
+ it "updates the requested fetmeeting" do
+ fetmeeting = Fetmeeting.create! valid_attributes
+ # Assuming there are no other fetmeetings in the database, this
+ # specifies that the Fetmeeting created on the previous line
+ # receives the :update_attributes message with whatever params are
+ # submitted in the request.
+ Fetmeeting.any_instance.should_receive(:update_attributes).with({ "tnlist" => "MyText" })
+ put :update, {:id => fetmeeting.to_param, :fetmeeting => { "tnlist" => "MyText" }}, valid_session
+ end
+
+ it "assigns the requested fetmeeting as @fetmeeting" do
+ fetmeeting = Fetmeeting.create! valid_attributes
+ put :update, {:id => fetmeeting.to_param, :fetmeeting => valid_attributes}, valid_session
+ assigns(:fetmeeting).should eq(fetmeeting)
+ end
+
+ it "redirects to the fetmeeting" do
+ fetmeeting = Fetmeeting.create! valid_attributes
+ put :update, {:id => fetmeeting.to_param, :fetmeeting => valid_attributes}, valid_session
+ response.should redirect_to(fetmeeting)
+ end
+ end
+
+ describe "with invalid params" do
+ it "assigns the fetmeeting as @fetmeeting" do
+ fetmeeting = Fetmeeting.create! valid_attributes
+ # Trigger the behavior that occurs when invalid params are submitted
+ Fetmeeting.any_instance.stub(:save).and_return(false)
+ put :update, {:id => fetmeeting.to_param, :fetmeeting => { "tnlist" => "invalid value" }}, valid_session
+ assigns(:fetmeeting).should eq(fetmeeting)
+ end
+
+ it "re-renders the 'edit' template" do
+ fetmeeting = Fetmeeting.create! valid_attributes
+ # Trigger the behavior that occurs when invalid params are submitted
+ Fetmeeting.any_instance.stub(:save).and_return(false)
+ put :update, {:id => fetmeeting.to_param, :fetmeeting => { "tnlist" => "invalid value" }}, valid_session
+ response.should render_template("edit")
+ end
+ end
+ end
+
+ describe "DELETE destroy" do
+ it "destroys the requested fetmeeting" do
+ fetmeeting = Fetmeeting.create! valid_attributes
+ expect {
+ delete :destroy, {:id => fetmeeting.to_param}, valid_session
+ }.to change(Fetmeeting, :count).by(-1)
+ end
+
+ it "redirects to the fetmeetings list" do
+ fetmeeting = Fetmeeting.create! valid_attributes
+ delete :destroy, {:id => fetmeeting.to_param}, valid_session
+ response.should redirect_to(fetmeetings_url)
+ end
+ end
+
+end
diff --git a/spec/controllers/fetmeetingtops_controller_spec.rb b/spec/controllers/fetmeetingtops_controller_spec.rb
new file mode 100644
index 0000000..7c4a70d
--- /dev/null
+++ b/spec/controllers/fetmeetingtops_controller_spec.rb
@@ -0,0 +1,160 @@
+require 'spec_helper'
+
+# This spec was generated by rspec-rails when you ran the scaffold generator.
+# It demonstrates how one might use RSpec to specify the controller code that
+# was generated by Rails when you ran the scaffold generator.
+#
+# It assumes that the implementation code is generated by the rails scaffold
+# generator. If you are using any extension libraries to generate different
+# controller code, this generated spec may or may not pass.
+#
+# It only uses APIs available in rails and/or rspec-rails. There are a number
+# of tools you can use to make these specs even more expressive, but we're
+# sticking to rails and rspec-rails APIs to keep things simple and stable.
+#
+# Compared to earlier versions of this generator, there is very limited use of
+# stubs and message expectations in this spec. Stubs are only used when there
+# is no simpler way to get a handle on the object needed for the example.
+# Message expectations are only used when there is no simpler way to specify
+# that an instance is receiving a specific message.
+
+describe FetmeetingtopsController do
+
+ # This should return the minimal set of attributes required to create a valid
+ # Fetmeetingtop. As you add validations to Fetmeetingtop, be sure to
+ # adjust the attributes here as well.
+ let(:valid_attributes) { { "title" => "MyString" } }
+
+ # This should return the minimal set of values that should be in the session
+ # in order to pass any filters (e.g. authentication) defined in
+ # FetmeetingtopsController. Be sure to keep this updated too.
+ let(:valid_session) { {} }
+
+ describe "GET index" do
+ it "assigns all fetmeetingtops as @fetmeetingtops" do
+ fetmeetingtop = Fetmeetingtop.create! valid_attributes
+ get :index, {}, valid_session
+ assigns(:fetmeetingtops).should eq([fetmeetingtop])
+ end
+ end
+
+ describe "GET show" do
+ it "assigns the requested fetmeetingtop as @fetmeetingtop" do
+ fetmeetingtop = Fetmeetingtop.create! valid_attributes
+ get :show, {:id => fetmeetingtop.to_param}, valid_session
+ assigns(:fetmeetingtop).should eq(fetmeetingtop)
+ end
+ end
+
+ describe "GET new" do
+ it "assigns a new fetmeetingtop as @fetmeetingtop" do
+ get :new, {}, valid_session
+ assigns(:fetmeetingtop).should be_a_new(Fetmeetingtop)
+ end
+ end
+
+ describe "GET edit" do
+ it "assigns the requested fetmeetingtop as @fetmeetingtop" do
+ fetmeetingtop = Fetmeetingtop.create! valid_attributes
+ get :edit, {:id => fetmeetingtop.to_param}, valid_session
+ assigns(:fetmeetingtop).should eq(fetmeetingtop)
+ end
+ end
+
+ describe "POST create" do
+ describe "with valid params" do
+ it "creates a new Fetmeetingtop" do
+ expect {
+ post :create, {:fetmeetingtop => valid_attributes}, valid_session
+ }.to change(Fetmeetingtop, :count).by(1)
+ end
+
+ it "assigns a newly created fetmeetingtop as @fetmeetingtop" do
+ post :create, {:fetmeetingtop => valid_attributes}, valid_session
+ assigns(:fetmeetingtop).should be_a(Fetmeetingtop)
+ assigns(:fetmeetingtop).should be_persisted
+ end
+
+ it "redirects to the created fetmeetingtop" do
+ post :create, {:fetmeetingtop => valid_attributes}, valid_session
+ response.should redirect_to(Fetmeetingtop.last)
+ end
+ end
+
+ describe "with invalid params" do
+ it "assigns a newly created but unsaved fetmeetingtop as @fetmeetingtop" do
+ # Trigger the behavior that occurs when invalid params are submitted
+ Fetmeetingtop.any_instance.stub(:save).and_return(false)
+ post :create, {:fetmeetingtop => { "title" => "invalid value" }}, valid_session
+ assigns(:fetmeetingtop).should be_a_new(Fetmeetingtop)
+ end
+
+ it "re-renders the 'new' template" do
+ # Trigger the behavior that occurs when invalid params are submitted
+ Fetmeetingtop.any_instance.stub(:save).and_return(false)
+ post :create, {:fetmeetingtop => { "title" => "invalid value" }}, valid_session
+ response.should render_template("new")
+ end
+ end
+ end
+
+ describe "PUT update" do
+ describe "with valid params" do
+ it "updates the requested fetmeetingtop" do
+ fetmeetingtop = Fetmeetingtop.create! valid_attributes
+ # Assuming there are no other fetmeetingtops in the database, this
+ # specifies that the Fetmeetingtop created on the previous line
+ # receives the :update_attributes message with whatever params are
+ # submitted in the request.
+ Fetmeetingtop.any_instance.should_receive(:update_attributes).with({ "title" => "MyString" })
+ put :update, {:id => fetmeetingtop.to_param, :fetmeetingtop => { "title" => "MyString" }}, valid_session
+ end
+
+ it "assigns the requested fetmeetingtop as @fetmeetingtop" do
+ fetmeetingtop = Fetmeetingtop.create! valid_attributes
+ put :update, {:id => fetmeetingtop.to_param, :fetmeetingtop => valid_attributes}, valid_session
+ assigns(:fetmeetingtop).should eq(fetmeetingtop)
+ end
+
+ it "redirects to the fetmeetingtop" do
+ fetmeetingtop = Fetmeetingtop.create! valid_attributes
+ put :update, {:id => fetmeetingtop.to_param, :fetmeetingtop => valid_attributes}, valid_session
+ response.should redirect_to(fetmeetingtop)
+ end
+ end
+
+ describe "with invalid params" do
+ it "assigns the fetmeetingtop as @fetmeetingtop" do
+ fetmeetingtop = Fetmeetingtop.create! valid_attributes
+ # Trigger the behavior that occurs when invalid params are submitted
+ Fetmeetingtop.any_instance.stub(:save).and_return(false)
+ put :update, {:id => fetmeetingtop.to_param, :fetmeetingtop => { "title" => "invalid value" }}, valid_session
+ assigns(:fetmeetingtop).should eq(fetmeetingtop)
+ end
+
+ it "re-renders the 'edit' template" do
+ fetmeetingtop = Fetmeetingtop.create! valid_attributes
+ # Trigger the behavior that occurs when invalid params are submitted
+ Fetmeetingtop.any_instance.stub(:save).and_return(false)
+ put :update, {:id => fetmeetingtop.to_param, :fetmeetingtop => { "title" => "invalid value" }}, valid_session
+ response.should render_template("edit")
+ end
+ end
+ end
+
+ describe "DELETE destroy" do
+ it "destroys the requested fetmeetingtop" do
+ fetmeetingtop = Fetmeetingtop.create! valid_attributes
+ expect {
+ delete :destroy, {:id => fetmeetingtop.to_param}, valid_session
+ }.to change(Fetmeetingtop, :count).by(-1)
+ end
+
+ it "redirects to the fetmeetingtops list" do
+ fetmeetingtop = Fetmeetingtop.create! valid_attributes
+ delete :destroy, {:id => fetmeetingtop.to_param}, valid_session
+ response.should redirect_to(fetmeetingtops_url)
+ end
+ end
+
+end
diff --git a/spec/factories/fetmeetings.rb b/spec/factories/fetmeetings.rb
new file mode 100644
index 0000000..8cf06b7
--- /dev/null
+++ b/spec/factories/fetmeetings.rb
@@ -0,0 +1,8 @@
+# Read about factories at https://github.com/thoughtbot/factory_girl
+
+FactoryGirl.define do
+ factory :fetmeeting do
+ tnlist "MyText"
+ typ 1
+ end
+end
diff --git a/spec/factories/fetmeetingtops.rb b/spec/factories/fetmeetingtops.rb
new file mode 100644
index 0000000..1443519
--- /dev/null
+++ b/spec/factories/fetmeetingtops.rb
@@ -0,0 +1,11 @@
+# Read about factories at https://github.com/thoughtbot/factory_girl
+
+FactoryGirl.define do
+ factory :fetmeetingtop do
+ title "MyString"
+ text "MyText"
+ discussion "MyText"
+ ersteller "MyString"
+ fetmeeting_id 1
+ end
+end
diff --git a/spec/helpers/fetmeetings_helper_spec.rb b/spec/helpers/fetmeetings_helper_spec.rb
new file mode 100644
index 0000000..ca81428
--- /dev/null
+++ b/spec/helpers/fetmeetings_helper_spec.rb
@@ -0,0 +1,15 @@
+require 'spec_helper'
+
+# Specs in this file have access to a helper object that includes
+# the FetmeetingsHelper. For example:
+#
+# describe FetmeetingsHelper do
+# describe "string concat" do
+# it "concats two strings with spaces" do
+# expect(helper.concat_strings("this","that")).to eq("this that")
+# end
+# end
+# end
+describe FetmeetingsHelper do
+ pending "add some examples to (or delete) #{__FILE__}"
+end
diff --git a/spec/helpers/fetmeetingtops_helper_spec.rb b/spec/helpers/fetmeetingtops_helper_spec.rb
new file mode 100644
index 0000000..1304fcd
--- /dev/null
+++ b/spec/helpers/fetmeetingtops_helper_spec.rb
@@ -0,0 +1,15 @@
+require 'spec_helper'
+
+# Specs in this file have access to a helper object that includes
+# the FetmeetingtopsHelper. For example:
+#
+# describe FetmeetingtopsHelper do
+# describe "string concat" do
+# it "concats two strings with spaces" do
+# expect(helper.concat_strings("this","that")).to eq("this that")
+# end
+# end
+# end
+describe FetmeetingtopsHelper do
+ pending "add some examples to (or delete) #{__FILE__}"
+end
diff --git a/spec/models/fetmeeting_spec.rb b/spec/models/fetmeeting_spec.rb
new file mode 100644
index 0000000..f809f99
--- /dev/null
+++ b/spec/models/fetmeeting_spec.rb
@@ -0,0 +1,5 @@
+require 'spec_helper'
+
+describe Fetmeeting do
+ pending "add some examples to (or delete) #{__FILE__}"
+end
diff --git a/spec/models/fetmeetingtop_spec.rb b/spec/models/fetmeetingtop_spec.rb
new file mode 100644
index 0000000..e508e83
--- /dev/null
+++ b/spec/models/fetmeetingtop_spec.rb
@@ -0,0 +1,5 @@
+require 'spec_helper'
+
+describe Fetmeetingtop do
+ pending "add some examples to (or delete) #{__FILE__}"
+end
diff --git a/spec/requests/fetmeetings_spec.rb b/spec/requests/fetmeetings_spec.rb
new file mode 100644
index 0000000..0444c6d
--- /dev/null
+++ b/spec/requests/fetmeetings_spec.rb
@@ -0,0 +1,11 @@
+require 'spec_helper'
+
+describe "Fetmeetings" do
+ describe "GET /fetmeetings" do
+ it "works! (now write some real specs)" do
+ # Run the generator again with the --webrat flag if you want to use webrat methods/matchers
+ get fetmeetings_path
+ response.status.should be(200)
+ end
+ end
+end
diff --git a/spec/requests/fetmeetingtops_spec.rb b/spec/requests/fetmeetingtops_spec.rb
new file mode 100644
index 0000000..7273cc6
--- /dev/null
+++ b/spec/requests/fetmeetingtops_spec.rb
@@ -0,0 +1,11 @@
+require 'spec_helper'
+
+describe "Fetmeetingtops" do
+ describe "GET /fetmeetingtops" do
+ it "works! (now write some real specs)" do
+ # Run the generator again with the --webrat flag if you want to use webrat methods/matchers
+ get fetmeetingtops_path
+ response.status.should be(200)
+ end
+ end
+end
diff --git a/spec/routing/fetmeetings_routing_spec.rb b/spec/routing/fetmeetings_routing_spec.rb
new file mode 100644
index 0000000..77d71e6
--- /dev/null
+++ b/spec/routing/fetmeetings_routing_spec.rb
@@ -0,0 +1,35 @@
+require "spec_helper"
+
+describe FetmeetingsController do
+ describe "routing" do
+
+ it "routes to #index" do
+ get("/fetmeetings").should route_to("fetmeetings#index")
+ end
+
+ it "routes to #new" do
+ get("/fetmeetings/new").should route_to("fetmeetings#new")
+ end
+
+ it "routes to #show" do
+ get("/fetmeetings/1").should route_to("fetmeetings#show", :id => "1")
+ end
+
+ it "routes to #edit" do
+ get("/fetmeetings/1/edit").should route_to("fetmeetings#edit", :id => "1")
+ end
+
+ it "routes to #create" do
+ post("/fetmeetings").should route_to("fetmeetings#create")
+ end
+
+ it "routes to #update" do
+ put("/fetmeetings/1").should route_to("fetmeetings#update", :id => "1")
+ end
+
+ it "routes to #destroy" do
+ delete("/fetmeetings/1").should route_to("fetmeetings#destroy", :id => "1")
+ end
+
+ end
+end
diff --git a/spec/routing/fetmeetingtops_routing_spec.rb b/spec/routing/fetmeetingtops_routing_spec.rb
new file mode 100644
index 0000000..c937eee
--- /dev/null
+++ b/spec/routing/fetmeetingtops_routing_spec.rb
@@ -0,0 +1,35 @@
+require "spec_helper"
+
+describe FetmeetingtopsController do
+ describe "routing" do
+
+ it "routes to #index" do
+ get("/fetmeetingtops").should route_to("fetmeetingtops#index")
+ end
+
+ it "routes to #new" do
+ get("/fetmeetingtops/new").should route_to("fetmeetingtops#new")
+ end
+
+ it "routes to #show" do
+ get("/fetmeetingtops/1").should route_to("fetmeetingtops#show", :id => "1")
+ end
+
+ it "routes to #edit" do
+ get("/fetmeetingtops/1/edit").should route_to("fetmeetingtops#edit", :id => "1")
+ end
+
+ it "routes to #create" do
+ post("/fetmeetingtops").should route_to("fetmeetingtops#create")
+ end
+
+ it "routes to #update" do
+ put("/fetmeetingtops/1").should route_to("fetmeetingtops#update", :id => "1")
+ end
+
+ it "routes to #destroy" do
+ delete("/fetmeetingtops/1").should route_to("fetmeetingtops#destroy", :id => "1")
+ end
+
+ end
+end
diff --git a/spec/views/fetmeetings/edit.html.erb_spec.rb b/spec/views/fetmeetings/edit.html.erb_spec.rb
new file mode 100644
index 0000000..5c565e6
--- /dev/null
+++ b/spec/views/fetmeetings/edit.html.erb_spec.rb
@@ -0,0 +1,20 @@
+require 'spec_helper'
+
+describe "fetmeetings/edit" do
+ before(:each) do
+ @fetmeeting = assign(:fetmeeting, stub_model(Fetmeeting,
+ :tnlist => "MyText",
+ :typ => 1
+ ))
+ end
+
+ it "renders the edit fetmeeting form" do
+ render
+
+ # Run the generator again with the --webrat flag if you want to use webrat matchers
+ assert_select "form[action=?][method=?]", fetmeeting_path(@fetmeeting), "post" do
+ assert_select "textarea#fetmeeting_tnlist[name=?]", "fetmeeting[tnlist]"
+ assert_select "input#fetmeeting_typ[name=?]", "fetmeeting[typ]"
+ end
+ end
+end
diff --git a/spec/views/fetmeetings/index.html.erb_spec.rb b/spec/views/fetmeetings/index.html.erb_spec.rb
new file mode 100644
index 0000000..96c6ac8
--- /dev/null
+++ b/spec/views/fetmeetings/index.html.erb_spec.rb
@@ -0,0 +1,23 @@
+require 'spec_helper'
+
+describe "fetmeetings/index" do
+ before(:each) do
+ assign(:fetmeetings, [
+ stub_model(Fetmeeting,
+ :tnlist => "MyText",
+ :typ => 1
+ ),
+ stub_model(Fetmeeting,
+ :tnlist => "MyText",
+ :typ => 1
+ )
+ ])
+ end
+
+ it "renders a list of fetmeetings" do
+ render
+ # Run the generator again with the --webrat flag if you want to use webrat matchers
+ assert_select "tr>td", :text => "MyText".to_s, :count => 2
+ assert_select "tr>td", :text => 1.to_s, :count => 2
+ end
+end
diff --git a/spec/views/fetmeetings/new.html.erb_spec.rb b/spec/views/fetmeetings/new.html.erb_spec.rb
new file mode 100644
index 0000000..4773b40
--- /dev/null
+++ b/spec/views/fetmeetings/new.html.erb_spec.rb
@@ -0,0 +1,20 @@
+require 'spec_helper'
+
+describe "fetmeetings/new" do
+ before(:each) do
+ assign(:fetmeeting, stub_model(Fetmeeting,
+ :tnlist => "MyText",
+ :typ => 1
+ ).as_new_record)
+ end
+
+ it "renders new fetmeeting form" do
+ render
+
+ # Run the generator again with the --webrat flag if you want to use webrat matchers
+ assert_select "form[action=?][method=?]", fetmeetings_path, "post" do
+ assert_select "textarea#fetmeeting_tnlist[name=?]", "fetmeeting[tnlist]"
+ assert_select "input#fetmeeting_typ[name=?]", "fetmeeting[typ]"
+ end
+ end
+end
diff --git a/spec/views/fetmeetings/show.html.erb_spec.rb b/spec/views/fetmeetings/show.html.erb_spec.rb
new file mode 100644
index 0000000..4e54a71
--- /dev/null
+++ b/spec/views/fetmeetings/show.html.erb_spec.rb
@@ -0,0 +1,17 @@
+require 'spec_helper'
+
+describe "fetmeetings/show" do
+ before(:each) do
+ @fetmeeting = assign(:fetmeeting, stub_model(Fetmeeting,
+ :tnlist => "MyText",
+ :typ => 1
+ ))
+ end
+
+ it "renders attributes in
" do
+ render
+ # Run the generator again with the --webrat flag if you want to use webrat matchers
+ rendered.should match(/MyText/)
+ rendered.should match(/1/)
+ end
+end
diff --git a/spec/views/fetmeetingtops/edit.html.erb_spec.rb b/spec/views/fetmeetingtops/edit.html.erb_spec.rb
new file mode 100644
index 0000000..11b3899
--- /dev/null
+++ b/spec/views/fetmeetingtops/edit.html.erb_spec.rb
@@ -0,0 +1,26 @@
+require 'spec_helper'
+
+describe "fetmeetingtops/edit" do
+ before(:each) do
+ @fetmeetingtop = assign(:fetmeetingtop, stub_model(Fetmeetingtop,
+ :title => "MyString",
+ :text => "MyText",
+ :discussion => "MyText",
+ :ersteller => "MyString",
+ :fetmeeting_id => 1
+ ))
+ end
+
+ it "renders the edit fetmeetingtop form" do
+ render
+
+ # Run the generator again with the --webrat flag if you want to use webrat matchers
+ assert_select "form[action=?][method=?]", fetmeetingtop_path(@fetmeetingtop), "post" do
+ assert_select "input#fetmeetingtop_title[name=?]", "fetmeetingtop[title]"
+ assert_select "textarea#fetmeetingtop_text[name=?]", "fetmeetingtop[text]"
+ assert_select "textarea#fetmeetingtop_discussion[name=?]", "fetmeetingtop[discussion]"
+ assert_select "input#fetmeetingtop_ersteller[name=?]", "fetmeetingtop[ersteller]"
+ assert_select "input#fetmeetingtop_fetmeeting_id[name=?]", "fetmeetingtop[fetmeeting_id]"
+ end
+ end
+end
diff --git a/spec/views/fetmeetingtops/index.html.erb_spec.rb b/spec/views/fetmeetingtops/index.html.erb_spec.rb
new file mode 100644
index 0000000..8935c13
--- /dev/null
+++ b/spec/views/fetmeetingtops/index.html.erb_spec.rb
@@ -0,0 +1,32 @@
+require 'spec_helper'
+
+describe "fetmeetingtops/index" do
+ before(:each) do
+ assign(:fetmeetingtops, [
+ stub_model(Fetmeetingtop,
+ :title => "Title",
+ :text => "MyText",
+ :discussion => "MyText",
+ :ersteller => "Ersteller",
+ :fetmeeting_id => 1
+ ),
+ stub_model(Fetmeetingtop,
+ :title => "Title",
+ :text => "MyText",
+ :discussion => "MyText",
+ :ersteller => "Ersteller",
+ :fetmeeting_id => 1
+ )
+ ])
+ end
+
+ it "renders a list of fetmeetingtops" do
+ render
+ # Run the generator again with the --webrat flag if you want to use webrat matchers
+ assert_select "tr>td", :text => "Title".to_s, :count => 2
+ assert_select "tr>td", :text => "MyText".to_s, :count => 2
+ assert_select "tr>td", :text => "MyText".to_s, :count => 2
+ assert_select "tr>td", :text => "Ersteller".to_s, :count => 2
+ assert_select "tr>td", :text => 1.to_s, :count => 2
+ end
+end
diff --git a/spec/views/fetmeetingtops/new.html.erb_spec.rb b/spec/views/fetmeetingtops/new.html.erb_spec.rb
new file mode 100644
index 0000000..43611f8
--- /dev/null
+++ b/spec/views/fetmeetingtops/new.html.erb_spec.rb
@@ -0,0 +1,26 @@
+require 'spec_helper'
+
+describe "fetmeetingtops/new" do
+ before(:each) do
+ assign(:fetmeetingtop, stub_model(Fetmeetingtop,
+ :title => "MyString",
+ :text => "MyText",
+ :discussion => "MyText",
+ :ersteller => "MyString",
+ :fetmeeting_id => 1
+ ).as_new_record)
+ end
+
+ it "renders new fetmeetingtop form" do
+ render
+
+ # Run the generator again with the --webrat flag if you want to use webrat matchers
+ assert_select "form[action=?][method=?]", fetmeetingtops_path, "post" do
+ assert_select "input#fetmeetingtop_title[name=?]", "fetmeetingtop[title]"
+ assert_select "textarea#fetmeetingtop_text[name=?]", "fetmeetingtop[text]"
+ assert_select "textarea#fetmeetingtop_discussion[name=?]", "fetmeetingtop[discussion]"
+ assert_select "input#fetmeetingtop_ersteller[name=?]", "fetmeetingtop[ersteller]"
+ assert_select "input#fetmeetingtop_fetmeeting_id[name=?]", "fetmeetingtop[fetmeeting_id]"
+ end
+ end
+end
diff --git a/spec/views/fetmeetingtops/show.html.erb_spec.rb b/spec/views/fetmeetingtops/show.html.erb_spec.rb
new file mode 100644
index 0000000..d566f58
--- /dev/null
+++ b/spec/views/fetmeetingtops/show.html.erb_spec.rb
@@ -0,0 +1,23 @@
+require 'spec_helper'
+
+describe "fetmeetingtops/show" do
+ before(:each) do
+ @fetmeetingtop = assign(:fetmeetingtop, stub_model(Fetmeetingtop,
+ :title => "Title",
+ :text => "MyText",
+ :discussion => "MyText",
+ :ersteller => "Ersteller",
+ :fetmeeting_id => 1
+ ))
+ end
+
+ it "renders attributes in
" do
+ render
+ # Run the generator again with the --webrat flag if you want to use webrat matchers
+ rendered.should match(/Title/)
+ rendered.should match(/MyText/)
+ rendered.should match(/MyText/)
+ rendered.should match(/Ersteller/)
+ rendered.should match(/1/)
+ end
+end
From 85d2bb5bf9ddb4e568d4886fb11be5f87c0966df Mon Sep 17 00:00:00 2001
From: Thomas Blazek
Date: Sun, 11 Jan 2015 22:18:31 +0100
Subject: [PATCH 02/16] Check for 0 themen
---
app/controllers/home_controller.rb | 4 ++++
1 file changed, 4 insertions(+)
diff --git a/app/controllers/home_controller.rb b/app/controllers/home_controller.rb
index 34725b2..c85071d 100755
--- a/app/controllers/home_controller.rb
+++ b/app/controllers/home_controller.rb
@@ -2,8 +2,12 @@ class HomeController < ApplicationController
def index
@beispiele = Beispiel.last([Beispiel.count, 3].min)
@neuigkeiten = Neuigkeit.recent
+ if Thema.count>0
t=YAML.load_file("#{::Rails.root.to_s}/config/start_topic.yml")
@starttopic= @themen = Thema.where(:id=>t).first
+ else
+ @starttopic=@themen = nil
+ end
end
def dev
From 2931ee6cd6ae04024588cc9ace25b8b06c9d9aba Mon Sep 17 00:00:00 2001
From: Thomas Blazek
Date: Thu, 15 Jan 2015 12:56:52 +0100
Subject: [PATCH 03/16] Need to enforce the jquery-fileupload version
0.4.2 broke uploads for me
---
Gemfile | 4 ++--
1 file changed, 2 insertions(+), 2 deletions(-)
diff --git a/Gemfile b/Gemfile
index a83dee3..376b2cf 100755
--- a/Gemfile
+++ b/Gemfile
@@ -91,7 +91,7 @@ gem "simple_calendar", "~> 0.1.9"
gem 'rmagick'
gem 'bootstrap-addons-rails'
-gem "jquery-fileupload-rails"
+gem "jquery-fileupload-rails", "0.4.1"
gem "jquery-ui-rails","~> 4.1.1"
gem "font-awesome-rails"
gem "jquery-datetimepicker-rails"
@@ -115,4 +115,4 @@ gem 'sunspot_solr'
gem 'sitemap_generator'
gem 'whenever'
gem 'yaml_db'
-gem 'etherpad-lite'
\ No newline at end of file
+gem 'etherpad-lite'
From 3a00794851b9da46312aef9848af59588fd955b6 Mon Sep 17 00:00:00 2001
From: Thomas Blazek
Date: Thu, 15 Jan 2015 14:01:16 +0100
Subject: [PATCH 04/16] dfsd
---
app/views/galleries/show.html.erb | 51 +++++++++++++------------------
1 file changed, 21 insertions(+), 30 deletions(-)
diff --git a/app/views/galleries/show.html.erb b/app/views/galleries/show.html.erb
index 88ddcc2..4a370a5 100644
--- a/app/views/galleries/show.html.erb
+++ b/app/views/galleries/show.html.erb
@@ -39,45 +39,36 @@
-
-
-
-<%= link_to 'Edit', edit_fetmeetingtop_path(@fetmeetingtop) %> |
-<%= link_to 'Back', fetmeetingtops_path %>
diff --git a/config/routes.rb b/config/routes.rb
index 401bb77..0273519 100755
--- a/config/routes.rb
+++ b/config/routes.rb
@@ -1,11 +1,5 @@
Fetsite::Application.routes.draw do
- resources :fetmeetingtops
-
-
- resources :fetmeetings
-
-
themes_for_rails
devise_for :users, :controllers => { :omniauth_callbacks => "users/omniauth_callbacks" }
resources :home, :only=>[:index] do
diff --git a/db/migrate/20140507125633_create_fetmeetings.rb b/db/migrate/20140507125633_create_fetmeetings.rb
deleted file mode 100644
index cea9fef..0000000
--- a/db/migrate/20140507125633_create_fetmeetings.rb
+++ /dev/null
@@ -1,10 +0,0 @@
-class CreateFetmeetings < ActiveRecord::Migration
- def change
- create_table :fetmeetings do |t|
- t.text :tnlist
- t.integer :typ
-
- t.timestamps
- end
- end
-end
diff --git a/db/migrate/20140507130354_create_fetmeetingtops.rb b/db/migrate/20140507130354_create_fetmeetingtops.rb
deleted file mode 100644
index 810e5ce..0000000
--- a/db/migrate/20140507130354_create_fetmeetingtops.rb
+++ /dev/null
@@ -1,13 +0,0 @@
-class CreateFetmeetingtops < ActiveRecord::Migration
- def change
- create_table :fetmeetingtops do |t|
- t.string :title
- t.text :text
- t.text :discussion
- t.string :ersteller
- t.integer :fetmeeting_id
-
- t.timestamps
- end
- end
-end
diff --git a/spec/controllers/fetmeetings_controller_spec.rb b/spec/controllers/fetmeetings_controller_spec.rb
deleted file mode 100644
index 2467093..0000000
--- a/spec/controllers/fetmeetings_controller_spec.rb
+++ /dev/null
@@ -1,160 +0,0 @@
-require 'spec_helper'
-
-# This spec was generated by rspec-rails when you ran the scaffold generator.
-# It demonstrates how one might use RSpec to specify the controller code that
-# was generated by Rails when you ran the scaffold generator.
-#
-# It assumes that the implementation code is generated by the rails scaffold
-# generator. If you are using any extension libraries to generate different
-# controller code, this generated spec may or may not pass.
-#
-# It only uses APIs available in rails and/or rspec-rails. There are a number
-# of tools you can use to make these specs even more expressive, but we're
-# sticking to rails and rspec-rails APIs to keep things simple and stable.
-#
-# Compared to earlier versions of this generator, there is very limited use of
-# stubs and message expectations in this spec. Stubs are only used when there
-# is no simpler way to get a handle on the object needed for the example.
-# Message expectations are only used when there is no simpler way to specify
-# that an instance is receiving a specific message.
-
-describe FetmeetingsController do
-
- # This should return the minimal set of attributes required to create a valid
- # Fetmeeting. As you add validations to Fetmeeting, be sure to
- # adjust the attributes here as well.
- let(:valid_attributes) { { "tnlist" => "MyText" } }
-
- # This should return the minimal set of values that should be in the session
- # in order to pass any filters (e.g. authentication) defined in
- # FetmeetingsController. Be sure to keep this updated too.
- let(:valid_session) { {} }
-
- describe "GET index" do
- it "assigns all fetmeetings as @fetmeetings" do
- fetmeeting = Fetmeeting.create! valid_attributes
- get :index, {}, valid_session
- assigns(:fetmeetings).should eq([fetmeeting])
- end
- end
-
- describe "GET show" do
- it "assigns the requested fetmeeting as @fetmeeting" do
- fetmeeting = Fetmeeting.create! valid_attributes
- get :show, {:id => fetmeeting.to_param}, valid_session
- assigns(:fetmeeting).should eq(fetmeeting)
- end
- end
-
- describe "GET new" do
- it "assigns a new fetmeeting as @fetmeeting" do
- get :new, {}, valid_session
- assigns(:fetmeeting).should be_a_new(Fetmeeting)
- end
- end
-
- describe "GET edit" do
- it "assigns the requested fetmeeting as @fetmeeting" do
- fetmeeting = Fetmeeting.create! valid_attributes
- get :edit, {:id => fetmeeting.to_param}, valid_session
- assigns(:fetmeeting).should eq(fetmeeting)
- end
- end
-
- describe "POST create" do
- describe "with valid params" do
- it "creates a new Fetmeeting" do
- expect {
- post :create, {:fetmeeting => valid_attributes}, valid_session
- }.to change(Fetmeeting, :count).by(1)
- end
-
- it "assigns a newly created fetmeeting as @fetmeeting" do
- post :create, {:fetmeeting => valid_attributes}, valid_session
- assigns(:fetmeeting).should be_a(Fetmeeting)
- assigns(:fetmeeting).should be_persisted
- end
-
- it "redirects to the created fetmeeting" do
- post :create, {:fetmeeting => valid_attributes}, valid_session
- response.should redirect_to(Fetmeeting.last)
- end
- end
-
- describe "with invalid params" do
- it "assigns a newly created but unsaved fetmeeting as @fetmeeting" do
- # Trigger the behavior that occurs when invalid params are submitted
- Fetmeeting.any_instance.stub(:save).and_return(false)
- post :create, {:fetmeeting => { "tnlist" => "invalid value" }}, valid_session
- assigns(:fetmeeting).should be_a_new(Fetmeeting)
- end
-
- it "re-renders the 'new' template" do
- # Trigger the behavior that occurs when invalid params are submitted
- Fetmeeting.any_instance.stub(:save).and_return(false)
- post :create, {:fetmeeting => { "tnlist" => "invalid value" }}, valid_session
- response.should render_template("new")
- end
- end
- end
-
- describe "PUT update" do
- describe "with valid params" do
- it "updates the requested fetmeeting" do
- fetmeeting = Fetmeeting.create! valid_attributes
- # Assuming there are no other fetmeetings in the database, this
- # specifies that the Fetmeeting created on the previous line
- # receives the :update_attributes message with whatever params are
- # submitted in the request.
- Fetmeeting.any_instance.should_receive(:update_attributes).with({ "tnlist" => "MyText" })
- put :update, {:id => fetmeeting.to_param, :fetmeeting => { "tnlist" => "MyText" }}, valid_session
- end
-
- it "assigns the requested fetmeeting as @fetmeeting" do
- fetmeeting = Fetmeeting.create! valid_attributes
- put :update, {:id => fetmeeting.to_param, :fetmeeting => valid_attributes}, valid_session
- assigns(:fetmeeting).should eq(fetmeeting)
- end
-
- it "redirects to the fetmeeting" do
- fetmeeting = Fetmeeting.create! valid_attributes
- put :update, {:id => fetmeeting.to_param, :fetmeeting => valid_attributes}, valid_session
- response.should redirect_to(fetmeeting)
- end
- end
-
- describe "with invalid params" do
- it "assigns the fetmeeting as @fetmeeting" do
- fetmeeting = Fetmeeting.create! valid_attributes
- # Trigger the behavior that occurs when invalid params are submitted
- Fetmeeting.any_instance.stub(:save).and_return(false)
- put :update, {:id => fetmeeting.to_param, :fetmeeting => { "tnlist" => "invalid value" }}, valid_session
- assigns(:fetmeeting).should eq(fetmeeting)
- end
-
- it "re-renders the 'edit' template" do
- fetmeeting = Fetmeeting.create! valid_attributes
- # Trigger the behavior that occurs when invalid params are submitted
- Fetmeeting.any_instance.stub(:save).and_return(false)
- put :update, {:id => fetmeeting.to_param, :fetmeeting => { "tnlist" => "invalid value" }}, valid_session
- response.should render_template("edit")
- end
- end
- end
-
- describe "DELETE destroy" do
- it "destroys the requested fetmeeting" do
- fetmeeting = Fetmeeting.create! valid_attributes
- expect {
- delete :destroy, {:id => fetmeeting.to_param}, valid_session
- }.to change(Fetmeeting, :count).by(-1)
- end
-
- it "redirects to the fetmeetings list" do
- fetmeeting = Fetmeeting.create! valid_attributes
- delete :destroy, {:id => fetmeeting.to_param}, valid_session
- response.should redirect_to(fetmeetings_url)
- end
- end
-
-end
diff --git a/spec/controllers/fetmeetingtops_controller_spec.rb b/spec/controllers/fetmeetingtops_controller_spec.rb
deleted file mode 100644
index 7c4a70d..0000000
--- a/spec/controllers/fetmeetingtops_controller_spec.rb
+++ /dev/null
@@ -1,160 +0,0 @@
-require 'spec_helper'
-
-# This spec was generated by rspec-rails when you ran the scaffold generator.
-# It demonstrates how one might use RSpec to specify the controller code that
-# was generated by Rails when you ran the scaffold generator.
-#
-# It assumes that the implementation code is generated by the rails scaffold
-# generator. If you are using any extension libraries to generate different
-# controller code, this generated spec may or may not pass.
-#
-# It only uses APIs available in rails and/or rspec-rails. There are a number
-# of tools you can use to make these specs even more expressive, but we're
-# sticking to rails and rspec-rails APIs to keep things simple and stable.
-#
-# Compared to earlier versions of this generator, there is very limited use of
-# stubs and message expectations in this spec. Stubs are only used when there
-# is no simpler way to get a handle on the object needed for the example.
-# Message expectations are only used when there is no simpler way to specify
-# that an instance is receiving a specific message.
-
-describe FetmeetingtopsController do
-
- # This should return the minimal set of attributes required to create a valid
- # Fetmeetingtop. As you add validations to Fetmeetingtop, be sure to
- # adjust the attributes here as well.
- let(:valid_attributes) { { "title" => "MyString" } }
-
- # This should return the minimal set of values that should be in the session
- # in order to pass any filters (e.g. authentication) defined in
- # FetmeetingtopsController. Be sure to keep this updated too.
- let(:valid_session) { {} }
-
- describe "GET index" do
- it "assigns all fetmeetingtops as @fetmeetingtops" do
- fetmeetingtop = Fetmeetingtop.create! valid_attributes
- get :index, {}, valid_session
- assigns(:fetmeetingtops).should eq([fetmeetingtop])
- end
- end
-
- describe "GET show" do
- it "assigns the requested fetmeetingtop as @fetmeetingtop" do
- fetmeetingtop = Fetmeetingtop.create! valid_attributes
- get :show, {:id => fetmeetingtop.to_param}, valid_session
- assigns(:fetmeetingtop).should eq(fetmeetingtop)
- end
- end
-
- describe "GET new" do
- it "assigns a new fetmeetingtop as @fetmeetingtop" do
- get :new, {}, valid_session
- assigns(:fetmeetingtop).should be_a_new(Fetmeetingtop)
- end
- end
-
- describe "GET edit" do
- it "assigns the requested fetmeetingtop as @fetmeetingtop" do
- fetmeetingtop = Fetmeetingtop.create! valid_attributes
- get :edit, {:id => fetmeetingtop.to_param}, valid_session
- assigns(:fetmeetingtop).should eq(fetmeetingtop)
- end
- end
-
- describe "POST create" do
- describe "with valid params" do
- it "creates a new Fetmeetingtop" do
- expect {
- post :create, {:fetmeetingtop => valid_attributes}, valid_session
- }.to change(Fetmeetingtop, :count).by(1)
- end
-
- it "assigns a newly created fetmeetingtop as @fetmeetingtop" do
- post :create, {:fetmeetingtop => valid_attributes}, valid_session
- assigns(:fetmeetingtop).should be_a(Fetmeetingtop)
- assigns(:fetmeetingtop).should be_persisted
- end
-
- it "redirects to the created fetmeetingtop" do
- post :create, {:fetmeetingtop => valid_attributes}, valid_session
- response.should redirect_to(Fetmeetingtop.last)
- end
- end
-
- describe "with invalid params" do
- it "assigns a newly created but unsaved fetmeetingtop as @fetmeetingtop" do
- # Trigger the behavior that occurs when invalid params are submitted
- Fetmeetingtop.any_instance.stub(:save).and_return(false)
- post :create, {:fetmeetingtop => { "title" => "invalid value" }}, valid_session
- assigns(:fetmeetingtop).should be_a_new(Fetmeetingtop)
- end
-
- it "re-renders the 'new' template" do
- # Trigger the behavior that occurs when invalid params are submitted
- Fetmeetingtop.any_instance.stub(:save).and_return(false)
- post :create, {:fetmeetingtop => { "title" => "invalid value" }}, valid_session
- response.should render_template("new")
- end
- end
- end
-
- describe "PUT update" do
- describe "with valid params" do
- it "updates the requested fetmeetingtop" do
- fetmeetingtop = Fetmeetingtop.create! valid_attributes
- # Assuming there are no other fetmeetingtops in the database, this
- # specifies that the Fetmeetingtop created on the previous line
- # receives the :update_attributes message with whatever params are
- # submitted in the request.
- Fetmeetingtop.any_instance.should_receive(:update_attributes).with({ "title" => "MyString" })
- put :update, {:id => fetmeetingtop.to_param, :fetmeetingtop => { "title" => "MyString" }}, valid_session
- end
-
- it "assigns the requested fetmeetingtop as @fetmeetingtop" do
- fetmeetingtop = Fetmeetingtop.create! valid_attributes
- put :update, {:id => fetmeetingtop.to_param, :fetmeetingtop => valid_attributes}, valid_session
- assigns(:fetmeetingtop).should eq(fetmeetingtop)
- end
-
- it "redirects to the fetmeetingtop" do
- fetmeetingtop = Fetmeetingtop.create! valid_attributes
- put :update, {:id => fetmeetingtop.to_param, :fetmeetingtop => valid_attributes}, valid_session
- response.should redirect_to(fetmeetingtop)
- end
- end
-
- describe "with invalid params" do
- it "assigns the fetmeetingtop as @fetmeetingtop" do
- fetmeetingtop = Fetmeetingtop.create! valid_attributes
- # Trigger the behavior that occurs when invalid params are submitted
- Fetmeetingtop.any_instance.stub(:save).and_return(false)
- put :update, {:id => fetmeetingtop.to_param, :fetmeetingtop => { "title" => "invalid value" }}, valid_session
- assigns(:fetmeetingtop).should eq(fetmeetingtop)
- end
-
- it "re-renders the 'edit' template" do
- fetmeetingtop = Fetmeetingtop.create! valid_attributes
- # Trigger the behavior that occurs when invalid params are submitted
- Fetmeetingtop.any_instance.stub(:save).and_return(false)
- put :update, {:id => fetmeetingtop.to_param, :fetmeetingtop => { "title" => "invalid value" }}, valid_session
- response.should render_template("edit")
- end
- end
- end
-
- describe "DELETE destroy" do
- it "destroys the requested fetmeetingtop" do
- fetmeetingtop = Fetmeetingtop.create! valid_attributes
- expect {
- delete :destroy, {:id => fetmeetingtop.to_param}, valid_session
- }.to change(Fetmeetingtop, :count).by(-1)
- end
-
- it "redirects to the fetmeetingtops list" do
- fetmeetingtop = Fetmeetingtop.create! valid_attributes
- delete :destroy, {:id => fetmeetingtop.to_param}, valid_session
- response.should redirect_to(fetmeetingtops_url)
- end
- end
-
-end
diff --git a/spec/factories/fetmeetings.rb b/spec/factories/fetmeetings.rb
deleted file mode 100644
index 8cf06b7..0000000
--- a/spec/factories/fetmeetings.rb
+++ /dev/null
@@ -1,8 +0,0 @@
-# Read about factories at https://github.com/thoughtbot/factory_girl
-
-FactoryGirl.define do
- factory :fetmeeting do
- tnlist "MyText"
- typ 1
- end
-end
diff --git a/spec/factories/fetmeetingtops.rb b/spec/factories/fetmeetingtops.rb
deleted file mode 100644
index 1443519..0000000
--- a/spec/factories/fetmeetingtops.rb
+++ /dev/null
@@ -1,11 +0,0 @@
-# Read about factories at https://github.com/thoughtbot/factory_girl
-
-FactoryGirl.define do
- factory :fetmeetingtop do
- title "MyString"
- text "MyText"
- discussion "MyText"
- ersteller "MyString"
- fetmeeting_id 1
- end
-end
diff --git a/spec/helpers/fetmeetings_helper_spec.rb b/spec/helpers/fetmeetings_helper_spec.rb
deleted file mode 100644
index ca81428..0000000
--- a/spec/helpers/fetmeetings_helper_spec.rb
+++ /dev/null
@@ -1,15 +0,0 @@
-require 'spec_helper'
-
-# Specs in this file have access to a helper object that includes
-# the FetmeetingsHelper. For example:
-#
-# describe FetmeetingsHelper do
-# describe "string concat" do
-# it "concats two strings with spaces" do
-# expect(helper.concat_strings("this","that")).to eq("this that")
-# end
-# end
-# end
-describe FetmeetingsHelper do
- pending "add some examples to (or delete) #{__FILE__}"
-end
diff --git a/spec/helpers/fetmeetingtops_helper_spec.rb b/spec/helpers/fetmeetingtops_helper_spec.rb
deleted file mode 100644
index 1304fcd..0000000
--- a/spec/helpers/fetmeetingtops_helper_spec.rb
+++ /dev/null
@@ -1,15 +0,0 @@
-require 'spec_helper'
-
-# Specs in this file have access to a helper object that includes
-# the FetmeetingtopsHelper. For example:
-#
-# describe FetmeetingtopsHelper do
-# describe "string concat" do
-# it "concats two strings with spaces" do
-# expect(helper.concat_strings("this","that")).to eq("this that")
-# end
-# end
-# end
-describe FetmeetingtopsHelper do
- pending "add some examples to (or delete) #{__FILE__}"
-end
diff --git a/spec/models/fetmeeting_spec.rb b/spec/models/fetmeeting_spec.rb
deleted file mode 100644
index f809f99..0000000
--- a/spec/models/fetmeeting_spec.rb
+++ /dev/null
@@ -1,5 +0,0 @@
-require 'spec_helper'
-
-describe Fetmeeting do
- pending "add some examples to (or delete) #{__FILE__}"
-end
diff --git a/spec/models/fetmeetingtop_spec.rb b/spec/models/fetmeetingtop_spec.rb
deleted file mode 100644
index e508e83..0000000
--- a/spec/models/fetmeetingtop_spec.rb
+++ /dev/null
@@ -1,5 +0,0 @@
-require 'spec_helper'
-
-describe Fetmeetingtop do
- pending "add some examples to (or delete) #{__FILE__}"
-end
diff --git a/spec/requests/fetmeetings_spec.rb b/spec/requests/fetmeetings_spec.rb
deleted file mode 100644
index 0444c6d..0000000
--- a/spec/requests/fetmeetings_spec.rb
+++ /dev/null
@@ -1,11 +0,0 @@
-require 'spec_helper'
-
-describe "Fetmeetings" do
- describe "GET /fetmeetings" do
- it "works! (now write some real specs)" do
- # Run the generator again with the --webrat flag if you want to use webrat methods/matchers
- get fetmeetings_path
- response.status.should be(200)
- end
- end
-end
diff --git a/spec/requests/fetmeetingtops_spec.rb b/spec/requests/fetmeetingtops_spec.rb
deleted file mode 100644
index 7273cc6..0000000
--- a/spec/requests/fetmeetingtops_spec.rb
+++ /dev/null
@@ -1,11 +0,0 @@
-require 'spec_helper'
-
-describe "Fetmeetingtops" do
- describe "GET /fetmeetingtops" do
- it "works! (now write some real specs)" do
- # Run the generator again with the --webrat flag if you want to use webrat methods/matchers
- get fetmeetingtops_path
- response.status.should be(200)
- end
- end
-end
diff --git a/spec/routing/fetmeetings_routing_spec.rb b/spec/routing/fetmeetings_routing_spec.rb
deleted file mode 100644
index 77d71e6..0000000
--- a/spec/routing/fetmeetings_routing_spec.rb
+++ /dev/null
@@ -1,35 +0,0 @@
-require "spec_helper"
-
-describe FetmeetingsController do
- describe "routing" do
-
- it "routes to #index" do
- get("/fetmeetings").should route_to("fetmeetings#index")
- end
-
- it "routes to #new" do
- get("/fetmeetings/new").should route_to("fetmeetings#new")
- end
-
- it "routes to #show" do
- get("/fetmeetings/1").should route_to("fetmeetings#show", :id => "1")
- end
-
- it "routes to #edit" do
- get("/fetmeetings/1/edit").should route_to("fetmeetings#edit", :id => "1")
- end
-
- it "routes to #create" do
- post("/fetmeetings").should route_to("fetmeetings#create")
- end
-
- it "routes to #update" do
- put("/fetmeetings/1").should route_to("fetmeetings#update", :id => "1")
- end
-
- it "routes to #destroy" do
- delete("/fetmeetings/1").should route_to("fetmeetings#destroy", :id => "1")
- end
-
- end
-end
diff --git a/spec/routing/fetmeetingtops_routing_spec.rb b/spec/routing/fetmeetingtops_routing_spec.rb
deleted file mode 100644
index c937eee..0000000
--- a/spec/routing/fetmeetingtops_routing_spec.rb
+++ /dev/null
@@ -1,35 +0,0 @@
-require "spec_helper"
-
-describe FetmeetingtopsController do
- describe "routing" do
-
- it "routes to #index" do
- get("/fetmeetingtops").should route_to("fetmeetingtops#index")
- end
-
- it "routes to #new" do
- get("/fetmeetingtops/new").should route_to("fetmeetingtops#new")
- end
-
- it "routes to #show" do
- get("/fetmeetingtops/1").should route_to("fetmeetingtops#show", :id => "1")
- end
-
- it "routes to #edit" do
- get("/fetmeetingtops/1/edit").should route_to("fetmeetingtops#edit", :id => "1")
- end
-
- it "routes to #create" do
- post("/fetmeetingtops").should route_to("fetmeetingtops#create")
- end
-
- it "routes to #update" do
- put("/fetmeetingtops/1").should route_to("fetmeetingtops#update", :id => "1")
- end
-
- it "routes to #destroy" do
- delete("/fetmeetingtops/1").should route_to("fetmeetingtops#destroy", :id => "1")
- end
-
- end
-end
diff --git a/spec/views/fetmeetings/edit.html.erb_spec.rb b/spec/views/fetmeetings/edit.html.erb_spec.rb
deleted file mode 100644
index 5c565e6..0000000
--- a/spec/views/fetmeetings/edit.html.erb_spec.rb
+++ /dev/null
@@ -1,20 +0,0 @@
-require 'spec_helper'
-
-describe "fetmeetings/edit" do
- before(:each) do
- @fetmeeting = assign(:fetmeeting, stub_model(Fetmeeting,
- :tnlist => "MyText",
- :typ => 1
- ))
- end
-
- it "renders the edit fetmeeting form" do
- render
-
- # Run the generator again with the --webrat flag if you want to use webrat matchers
- assert_select "form[action=?][method=?]", fetmeeting_path(@fetmeeting), "post" do
- assert_select "textarea#fetmeeting_tnlist[name=?]", "fetmeeting[tnlist]"
- assert_select "input#fetmeeting_typ[name=?]", "fetmeeting[typ]"
- end
- end
-end
diff --git a/spec/views/fetmeetings/index.html.erb_spec.rb b/spec/views/fetmeetings/index.html.erb_spec.rb
deleted file mode 100644
index 96c6ac8..0000000
--- a/spec/views/fetmeetings/index.html.erb_spec.rb
+++ /dev/null
@@ -1,23 +0,0 @@
-require 'spec_helper'
-
-describe "fetmeetings/index" do
- before(:each) do
- assign(:fetmeetings, [
- stub_model(Fetmeeting,
- :tnlist => "MyText",
- :typ => 1
- ),
- stub_model(Fetmeeting,
- :tnlist => "MyText",
- :typ => 1
- )
- ])
- end
-
- it "renders a list of fetmeetings" do
- render
- # Run the generator again with the --webrat flag if you want to use webrat matchers
- assert_select "tr>td", :text => "MyText".to_s, :count => 2
- assert_select "tr>td", :text => 1.to_s, :count => 2
- end
-end
diff --git a/spec/views/fetmeetings/new.html.erb_spec.rb b/spec/views/fetmeetings/new.html.erb_spec.rb
deleted file mode 100644
index 4773b40..0000000
--- a/spec/views/fetmeetings/new.html.erb_spec.rb
+++ /dev/null
@@ -1,20 +0,0 @@
-require 'spec_helper'
-
-describe "fetmeetings/new" do
- before(:each) do
- assign(:fetmeeting, stub_model(Fetmeeting,
- :tnlist => "MyText",
- :typ => 1
- ).as_new_record)
- end
-
- it "renders new fetmeeting form" do
- render
-
- # Run the generator again with the --webrat flag if you want to use webrat matchers
- assert_select "form[action=?][method=?]", fetmeetings_path, "post" do
- assert_select "textarea#fetmeeting_tnlist[name=?]", "fetmeeting[tnlist]"
- assert_select "input#fetmeeting_typ[name=?]", "fetmeeting[typ]"
- end
- end
-end
diff --git a/spec/views/fetmeetings/show.html.erb_spec.rb b/spec/views/fetmeetings/show.html.erb_spec.rb
deleted file mode 100644
index 4e54a71..0000000
--- a/spec/views/fetmeetings/show.html.erb_spec.rb
+++ /dev/null
@@ -1,17 +0,0 @@
-require 'spec_helper'
-
-describe "fetmeetings/show" do
- before(:each) do
- @fetmeeting = assign(:fetmeeting, stub_model(Fetmeeting,
- :tnlist => "MyText",
- :typ => 1
- ))
- end
-
- it "renders attributes in
" do
- render
- # Run the generator again with the --webrat flag if you want to use webrat matchers
- rendered.should match(/MyText/)
- rendered.should match(/1/)
- end
-end
diff --git a/spec/views/fetmeetingtops/edit.html.erb_spec.rb b/spec/views/fetmeetingtops/edit.html.erb_spec.rb
deleted file mode 100644
index 11b3899..0000000
--- a/spec/views/fetmeetingtops/edit.html.erb_spec.rb
+++ /dev/null
@@ -1,26 +0,0 @@
-require 'spec_helper'
-
-describe "fetmeetingtops/edit" do
- before(:each) do
- @fetmeetingtop = assign(:fetmeetingtop, stub_model(Fetmeetingtop,
- :title => "MyString",
- :text => "MyText",
- :discussion => "MyText",
- :ersteller => "MyString",
- :fetmeeting_id => 1
- ))
- end
-
- it "renders the edit fetmeetingtop form" do
- render
-
- # Run the generator again with the --webrat flag if you want to use webrat matchers
- assert_select "form[action=?][method=?]", fetmeetingtop_path(@fetmeetingtop), "post" do
- assert_select "input#fetmeetingtop_title[name=?]", "fetmeetingtop[title]"
- assert_select "textarea#fetmeetingtop_text[name=?]", "fetmeetingtop[text]"
- assert_select "textarea#fetmeetingtop_discussion[name=?]", "fetmeetingtop[discussion]"
- assert_select "input#fetmeetingtop_ersteller[name=?]", "fetmeetingtop[ersteller]"
- assert_select "input#fetmeetingtop_fetmeeting_id[name=?]", "fetmeetingtop[fetmeeting_id]"
- end
- end
-end
diff --git a/spec/views/fetmeetingtops/index.html.erb_spec.rb b/spec/views/fetmeetingtops/index.html.erb_spec.rb
deleted file mode 100644
index 8935c13..0000000
--- a/spec/views/fetmeetingtops/index.html.erb_spec.rb
+++ /dev/null
@@ -1,32 +0,0 @@
-require 'spec_helper'
-
-describe "fetmeetingtops/index" do
- before(:each) do
- assign(:fetmeetingtops, [
- stub_model(Fetmeetingtop,
- :title => "Title",
- :text => "MyText",
- :discussion => "MyText",
- :ersteller => "Ersteller",
- :fetmeeting_id => 1
- ),
- stub_model(Fetmeetingtop,
- :title => "Title",
- :text => "MyText",
- :discussion => "MyText",
- :ersteller => "Ersteller",
- :fetmeeting_id => 1
- )
- ])
- end
-
- it "renders a list of fetmeetingtops" do
- render
- # Run the generator again with the --webrat flag if you want to use webrat matchers
- assert_select "tr>td", :text => "Title".to_s, :count => 2
- assert_select "tr>td", :text => "MyText".to_s, :count => 2
- assert_select "tr>td", :text => "MyText".to_s, :count => 2
- assert_select "tr>td", :text => "Ersteller".to_s, :count => 2
- assert_select "tr>td", :text => 1.to_s, :count => 2
- end
-end
diff --git a/spec/views/fetmeetingtops/new.html.erb_spec.rb b/spec/views/fetmeetingtops/new.html.erb_spec.rb
deleted file mode 100644
index 43611f8..0000000
--- a/spec/views/fetmeetingtops/new.html.erb_spec.rb
+++ /dev/null
@@ -1,26 +0,0 @@
-require 'spec_helper'
-
-describe "fetmeetingtops/new" do
- before(:each) do
- assign(:fetmeetingtop, stub_model(Fetmeetingtop,
- :title => "MyString",
- :text => "MyText",
- :discussion => "MyText",
- :ersteller => "MyString",
- :fetmeeting_id => 1
- ).as_new_record)
- end
-
- it "renders new fetmeetingtop form" do
- render
-
- # Run the generator again with the --webrat flag if you want to use webrat matchers
- assert_select "form[action=?][method=?]", fetmeetingtops_path, "post" do
- assert_select "input#fetmeetingtop_title[name=?]", "fetmeetingtop[title]"
- assert_select "textarea#fetmeetingtop_text[name=?]", "fetmeetingtop[text]"
- assert_select "textarea#fetmeetingtop_discussion[name=?]", "fetmeetingtop[discussion]"
- assert_select "input#fetmeetingtop_ersteller[name=?]", "fetmeetingtop[ersteller]"
- assert_select "input#fetmeetingtop_fetmeeting_id[name=?]", "fetmeetingtop[fetmeeting_id]"
- end
- end
-end
diff --git a/spec/views/fetmeetingtops/show.html.erb_spec.rb b/spec/views/fetmeetingtops/show.html.erb_spec.rb
deleted file mode 100644
index d566f58..0000000
--- a/spec/views/fetmeetingtops/show.html.erb_spec.rb
+++ /dev/null
@@ -1,23 +0,0 @@
-require 'spec_helper'
-
-describe "fetmeetingtops/show" do
- before(:each) do
- @fetmeetingtop = assign(:fetmeetingtop, stub_model(Fetmeetingtop,
- :title => "Title",
- :text => "MyText",
- :discussion => "MyText",
- :ersteller => "Ersteller",
- :fetmeeting_id => 1
- ))
- end
-
- it "renders attributes in
" do
- render
- # Run the generator again with the --webrat flag if you want to use webrat matchers
- rendered.should match(/Title/)
- rendered.should match(/MyText/)
- rendered.should match(/MyText/)
- rendered.should match(/Ersteller/)
- rendered.should match(/1/)
- end
-end