Skip to content

Instantly share code, notes, and snippets.

View mattheworiordan's full-sized avatar
💭
V. busy with Ably, building a great team 🚀

Matthew O'Riordan mattheworiordan

💭
V. busy with Ably, building a great team 🚀
View GitHub Profile
@mattheworiordan
mattheworiordan / corporate-cla.txt
Created June 18, 2018 08:57 — forked from open-sdsp-leader/corporate-cla.txt
Individual and Corporate CLA
Thank you for your interest in Open SDSP (the
"Open Specification") and Ably Real-time Ltd (the "Project Sponsor").
In order to clarify the intellectual property license granted with
Contributions from any person or entity, the Project Sponsor
must have a Contributor License Agreement (CLA) on file that has been
signed by each Contributor, indicating agreement to the license terms
below. This license is for your protection as a Contributor as well
as the protection of the Project Sponsor and its users; it does not
change your rights to use your own Contributions for any other purpose.
<div>Ably Quickstart example</div>
<ul id="output">
</ul>
Message: <input id="message" type="text" value="Hello"><br>
<input type="submit" id="publish" value="Publish the message">
</html>
body {
font-family: Helvetica, Verdana
}
p {
padding: 7px 10px;
}
#demo {
border: 1px solid #999;
}
<div>Ably Quickstart example</div>
<ul id="output">
</ul>
Message: <input id="message" type="text" value="Hello"><br>
<input type="submit" id="publish" value="Publish the message">
</html>
<p>
An alert box with Hello should have displayed
</p>
@mattheworiordan
mattheworiordan / QUnit.chain
Created September 1, 2011 16:57 — forked from filmaj/QUnit.chain
Tiny QUnit async test helper, eliminates pyramid code in async tests with multiple assertions, each requiring its own delay.
/**
* testAsyncStepsWithPause
* Executes any number of async Qunit tests with a pause between each step
*
* Author: Matthew O'Riordan, http://mattheworiordan.com
*
* Params:
* @timeToWait: milliseconds between running method and running tests
* @methods: 1+ function arguments passed in the format:
* function() {
@javascript
Scenario: confiming when saving inactive
Given I expect to click "OK" on a confirmation box saying "Are you sure?"
When I press "Save"
Then the confirmation box should have been displayed
And I should see "TV" in the "Campaign Keywords" section
Scenario: alert when form is not valid
Given I expect to click on an alert box saying "Please complete all fields in this form"
When I press "Save"
scenario "have ability to edit profile", :js => true do
@ability.should be_able_to(:edit, @profile)
end
require 'growl'
require 'open3'
ENV["WATCHR"] = "1"
$spec_cmd = "rspec --tty --drb --colour --format nested"
$cuke_cmd = "cucumber --color --drb --require features/step_definitions --require features/support"
$pass = File.join(File.expand_path(File.dirname(__FILE__)), '.watchr_images', 'pass.png')
$fail = File.join(File.expand_path(File.dirname(__FILE__)), '.watchr_images', 'fail.png')
$pending = File.join(File.expand_path(File.dirname(__FILE__)), '.watchr_images', 'pending.png')