This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| 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' |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| named_scope :estado, lambda { |estado| | |
| return {} unless estado != "todos_estados" | |
| { :conditions => ["anuncios.estado = ?", estado] } | |
| } |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| 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 |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| def total_sold | |
| self.prospects.map{ |prospect| @qt =+ 1 if prospect.status == "sold" } | |
| @qt | |
| end |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| <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; |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| class ConfigStore | |
| attr_reader :file | |
| def initialize(file) | |
| @file = file | |
| end | |
| def load | |
| @config ||= YAML::load(open(file)) | |
| self |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| 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" |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| 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, |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| <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> |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| 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", |