Skip to content

Instantly share code, notes, and snippets.

View felipero's full-sized avatar
🐞
Debugging

Felipe Rodrigues felipero

🐞
Debugging
View GitHub Profile
Then /^the selected date for "([^"]*)" should be "([^"]*)"$/ do |field, date|
field = field.tr('[', '_')
field = field.tr(']', '_')
year_field = field + '1i'
month_field = field + '2i'
day_field = field + '3i'
date = Date.parse(date)
field_with_id(year_field).element.search(".//option[@selected = 'selected']").inner_html.should =~ /#{date.year}/
Scenario: Add an invalid new task
Given I am on the tasks page
When I select "December 25, 2010" as the date
And I press "add"
Then I should see "1 error prohibited this task from being saved"
And I should see "Desc can't be blank"
And the selected date for "task[due]" should be "December 25, 2010"
(let ((buffer (url-retrieve-synchronously
"http://tromey.com/elpa/package-install.el")))
(save-excursion
(set-buffer buffer)
(goto-char (point-min))
(re-search-forward "^$" nil 'move)
(eval-region (point) (point-max))
(kill-buffer (current-buffer))))
;; Clojure configuration
77 (clojure-slime-config "/opt/clojure")
78
79 ;; Slime configuration
80 (require 'slime)
81 ;; Adding sbcl to slime
82 (add-to-list 'slime-lisp-implementations '(sbcl ("sbcl")))
;;; THIS CODE MUST BE UNDER THE ELPA CODE ADDE WHEN YOU INSTALLED ELPA
;; Clojure configuration
(clojure-slime-config "/opt/clojure")
;; Slime configuration
(require 'slime)
;; Adding sbcl to slime
(add-to-list 'slime-lisp-implementations '(sbcl ("sbcl")))
# Clojure jar file
clj=/opt/clojure/clojure/clojure.jar
# Directory where libaries/jar files can be found
clj_ext=~/.clojure
###
# Various java options:
###
class Pessoa implements Serializable {
static hasMany = [atendimentos:Atendimento]
String nome
Endereco endereco
static constraints = {
endereco(nullable:true)
}
package com.novell.aca.snippet
import org.junit.runner.RunWith
import org.specs._
import org.specs.mock.EasyMock
import runner.{JUnitSuiteRunner, JUnit4}
@RunWith(classOf[JUnitSuiteRunner])
class ProfilePageTest extends JUnit4(ProfilePageSpecs)
# enconding: utf-8
require File.join(File.dirname(__FILE__), "lib", "couch_rails", "version")
require 'rubygems'
require 'thor/rake_compat'
require 'spec/rake/spectask'
begin
require 'rdoc/task'
rescue LoadError
end
import groovyx.net.http.HTTPBuilder
import static groovyx.net.http.Method.GET
import static groovyx.net.http.ContentType.TEXT
class HTTPTester {
static void main(String[] args){
def http = new HTTPBuilder( 'http://fratechit.appspot.com' )