Skip to content

Instantly share code, notes, and snippets.

View diegorv's full-sized avatar

Diego Rossini diegorv

View GitHub Profile
Spork.prefork do
# IMPORTANT: This file was generated by Cucumber 0.4.2
# Edit at your own peril - it's recommended to regenerate this file
# in the future when you upgrade to a newer version of Cucumber.
# Consider adding your own code to a new file instead of editing this one.
# Sets up the Rails environment for Cucumber
ENV["RAILS_ENV"] ||= "cucumber"
require File.expand_path(File.dirname(__FILE__) + '/../../config/environment')
require 'cucumber/rails/world'
named_scope :estado, lambda { |estado|
return {} unless estado != "todos_estados"
{ :conditions => ["anuncios.estado = ?", estado] }
}
set :application, "myapp"
set :keep_releases, 5
# git options
set :scm, "git"
set :repository, "git://github.com/georgeguimaraes/myapp.git"
set :branch, "master"
set :deploy_via, :remote_cache
# deploy credentials
def total_sold
self.prospects.map{ |prospect| @qt =+ 1 if prospect.status == "sold" }
@qt
end
<html>
<head>
<title></title>
<META NAME="DESCRIPTION" CONTENT="">
<META NAME="KEYWORDS" CONTENT="">
<script type="text/javascript" src="jquery-1.3.2.min.js"></script>
<script type="text/javascript">
$(document).ready(function(){
var total1 = 0;
class ConfigStore
attr_reader :file
def initialize(file)
@file = file
end
def load
@config ||= YAML::load(open(file))
self
require File.expand_path(File.dirname(__FILE__) + '/../spec_helper')
describe EmployeesController do
describe "route generation" do
it "maps #index" do
route_for(:controller => "employees", :action => "index").should == "/employees"
end
it "maps #new" do
route_for(:controller => "employees", :action => "new").should == "/employees/new"
require File.expand_path(File.dirname(__FILE__) + '/../spec_helper')
describe EmployeeAddress do
before(:each) do
@valid_attributes_employee = {
:name => "value for name",
:cpf => "value for cpf",
:rg => "value for rg",
:company_entry => Time.now,
<h1>Listing employees</h1>
<table>
<tr>
<th>Name</th>
<th>Cpf</th>
<th>Rg</th>
<th>Company entry</th>
<th>Company left</th>
<th>Salary</th>
require File.expand_path(File.dirname(__FILE__) + '/../../spec_helper')
describe "/employees/index.html.erb" do
include EmployeesHelper
before(:each) do
assigns[:employees] = [
stub_model(Employee,
:name => "name",
:cpf => "cpf",