Skip to content

Instantly share code, notes, and snippets.

View sivabudh's full-sized avatar

Sivabudh Umpudh sivabudh

View GitHub Profile
@sivabudh
sivabudh / gist:1093653
Created July 19, 2011 20:41
Example of clicking on a link using Cucumber
When I follow 'Click me'
@sivabudh
sivabudh / gist:1093687
Created July 19, 2011 20:53
Example of clicking "Click me" text with CSS class "clickable-text"
find('.clickable-text', :text => 'Click me').click
@sivabudh
sivabudh / gist:1093695
Created July 19, 2011 20:59
Cucumber custom step for clickable-text
When /^I click the text "([^"]+)"$/ do |text|
find('.clickable-text', :text => text).click
end
@sivabudh
sivabudh / gist:1093702
Created July 19, 2011 21:02
Example of a link to click
<a href="path/to/url" class="clickable-text">Click me</a>
@sivabudh
sivabudh / gist:1093712
Created July 19, 2011 21:05
Plain text to click
<h3 class='clickable-text'>Click me</h3>
else if directive.constructor == Array
childTemplate = element.children()[0]
fragment = document.createDocumentFragment()
if childTemplate
for matchDirective in directive
expanded = expandTemplateInPlace $(childTemplate).clone(true), matchDirective
@sivabudh
sivabudh / gist:1095812
Created July 20, 2011 20:14
Example GLCE Standards using OPML
<?xml version="1.0" encoding="utf-8"?>
<opml version="1.0"> <!-- version is required by opml -->
<head> <!-- <head> is required by opml -->
<dateCreated>July 20, 2011 15:45:00</dateCreated>
<dateModified>July 20, 2011 15:45:00</dateModified>
<ownerName>Atomic Object</ownerName>
<ownerEmail>info@atomicobject.com</ownerEmail>
</head>
@sivabudh
sivabudh / gist:1245105
Created September 27, 2011 13:57
Update
- for course in @courses
- course.assessment_schedules.each do |assessment_schedule|
%tr.assessments
%td.course-title= course.title
%td.assessment-title= assessment_schedule.assessment_template.title
%td= assessment_schedule.assessment_template.created_at.to_s(:short)
%td.start-btn.text-center
- if assessment_schedule.takable?
= link_to "Start", assessment_schedule_assessments_path(assessment_schedule), :method => 'post', :class => "btn start"
@sivabudh
sivabudh / gist:1300128
Created October 20, 2011 00:52
Clickable Paypal checkout button
= link_to image_tag("https://www.paypal.com/en_US/i/btn/btn_xpressCheckout.gif"), :controller => 'paypal_express', :action => 'checkout'
@sivabudh
sivabudh / config\routes.rb
Created October 20, 2011 01:02
First addition to routes.rb
get "paypal_express/checkout"