Skip to content
This repository has been archived by the owner on Jun 2, 2020. It is now read-only.

Commit

Permalink
intermediate commit, all tests working
Browse files Browse the repository at this point in the history
  • Loading branch information
mamhoff committed Dec 12, 2013
1 parent 6cdcd25 commit e8f91a9
Show file tree
Hide file tree
Showing 9 changed files with 901 additions and 0 deletions.
828 changes: 828 additions & 0 deletions app/assets/javascripts/modernizr.js

Large diffs are not rendered by default.

3 changes: 3 additions & 0 deletions app/assets/javascripts/wishes.js.coffee
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
# Place all the behaviors and hooks related to the matching controller here.
# All this logic will automatically be available in application.js.
# You can use CoffeeScript in this file: http://coffeescript.org/
3 changes: 3 additions & 0 deletions app/assets/stylesheets/wishes.css.less
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
// Place all the styles related to the wishes controller here.
// They will automatically be included in application.css.
// You can use Less here: http://lesscss.org/
11 changes: 11 additions & 0 deletions app/controllers/wishes_controller.rb
Original file line number Diff line number Diff line change
@@ -0,0 +1,11 @@
class WishesController < ApplicationController
def new
@wish = Wish.new
@tour = wish_params["tour"]
end

private
def wish_params
params.permit(:tour)
end
end
2 changes: 2 additions & 0 deletions app/helpers/wishes_helper.rb
Original file line number Diff line number Diff line change
@@ -0,0 +1,2 @@
module WishesHelper
end
13 changes: 13 additions & 0 deletions app/views/wishes/new.html.erb
Original file line number Diff line number Diff line change
@@ -0,0 +1,13 @@
<% provide :title, "Buchen" %>
<div class="row">
<div class="col-md-6 col-md-offset-3">
<h1>Tour "<%= @tour %>" buchen </h1>
<%= form_for @wish, url: "#" do |f| %>
<%= f.label :fromtime %>
<%= datetime_field(:wish, :fromtime) %>

<%= f.label :totime %>
<%= datetime_field(:wish, :totime) %>

<%= f.submit "submit" %>
<% end %>
6 changes: 6 additions & 0 deletions spec/controllers/wishes_controller_spec.rb
Original file line number Diff line number Diff line change
@@ -0,0 +1,6 @@
require 'spec_helper'

describe WishesController do


end
15 changes: 15 additions & 0 deletions spec/helpers/wishes_helper_spec.rb
Original file line number Diff line number Diff line change
@@ -0,0 +1,15 @@
require 'spec_helper'

# Specs in this file have access to a helper object that includes
# the WishesHelper. For example:
#
# describe WishesHelper do
# describe "string concat" do
# it "concats two strings with spaces" do
# helper.concat_strings("this","that").should == "this that"
# end
# end
# end
describe WishesHelper do
pending "add some examples to (or delete) #{__FILE__}"
end
20 changes: 20 additions & 0 deletions spec/views/wishes/new.html.erb_spec.rb
Original file line number Diff line number Diff line change
@@ -0,0 +1,20 @@
require 'spec_helper'

describe "wish/new.html" do
before { visit new_wish_path }
it "should return something" do
expect(page).not_to be_blank
end

it "should have the correct title" do
expect(page).to have_title("Buchen")
end

it "should have a headline" do
expect(page).to have_selector("h1")
expect(page).to have_content("buchen")
end



end

0 comments on commit e8f91a9

Please sign in to comment.