Skip to content

Instantly share code, notes, and snippets.

Avatar
💭
V. busy with Ably, building a great team 🚀

Matthew O'Riordan mattheworiordan

💭
V. busy with Ably, building a great team 🚀
View GitHub Profile
View corporate-cla.txt
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.
View fiddle.html
<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>
View fiddle.css
body {
font-family: Helvetica, Verdana
}
p {
padding: 7px 10px;
}
#demo {
border: 1px solid #999;
}
View fiddle.html
<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>
View fiddle.html
<p>
An alert box with Hello should have displayed
</p>
@mattheworiordan
mattheworiordan / QUnit.chain
Created Sep 1, 2011 — forked from filmaj/QUnit.chain
Tiny QUnit async test helper, eliminates pyramid code in async tests with multiple assertions, each requiring its own delay.
View QUnit.chain
/**
* 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() {
View example.feature
@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"
View spec.rb
scenario "have ability to edit profile", :js => true do
@ability.should be_able_to(:edit, @profile)
end
View watchr.rb
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')
You can’t perform that action at this time.