Skip to content

Instantly share code, notes, and snippets.

@fidothe
fidothe / mocha.rb
Created May 12, 2009 10:26 — forked from drnic/mocha.rb
# For mocha integration, add this file into features/support folder
require "mocha"
World(Mocha::Standalone)
Before do
mocha_setup
end
.blog
#title
- unless entry_form.heading_image.nil? || !File.exist?(entry_form.heading_image.asset.path(:headline))
= image_tag(entry_form.heading_image.asset.url(:headline))
- else
= image_tag('headline_blank.png')
.image_upload
.threecolumn.noborder
- form_for(image_form, :url => assets_path, :html => {:enctype => 'multipart/form-data', :id => 'headline_image_form'}) do |f|
- unless @confirmation_code.nil?
- form_for(:game_citizen, :url => confirm_game_citizen_path(@game_citizen)) do |f|
%p
= f.hidden_field(:confirmation_code, :value => @confirmation_code)
= f.submit('Confirm my account!')
- if current_user
- if current_user.staff?
.admin.panel
%p= link_to('Create Blog post', new_entry_path)
%p= link_to('Create Page', new_page_path)