Skip to content

Instantly share code, notes, and snippets.

View wapcaplet's full-sized avatar

Eric Pierce wapcaplet

  • Society for Human Resource Management
  • Colorado Springs
View GitHub Profile
@wapcaplet
wapcaplet / gist:710877
Created November 22, 2010 22:53
Helpers in world not available from custom_env.rb
features/support/helpers/admin_helper.rb:
module AdminHelper
def create_admin_user(whatever)
# ...
end
end
World(AdminHelper)
features/support/custom_env.rb:
When a line includes a {...} style link, and the link text contains spaces, and the paragraph that the link is in contains more than 75 characters, the hyperlink does not get generated correctly (and instead, the raw {...} expression is displayed in the YARD output).
LINK WORKS:
If you make changes that you'd like to share, push them into your Kelp fork,
then {http://github.com/wapcaplet/kelp/pulls submit} a pull request.
LINK DOESN'T WORK:
If you make changes that you'd like to share, push them into your Kelp fork,
then {http://github.com/wapcaplet/kelp/pulls submit a pull request}.
{
"data" => {
"subscribers" => "" #CSV list
},
"payload" => {
"after" => "fe5c43825be82e9b7abec988a2520ad3a8f65c93",
"ref" => "refs/heads/master",
"before" => "0fc04841e10d032281ee961a566190deb59c613e",
$ nosetests -v
PySciSettings widget can be instantiated. ... ok
clear() empties the buffer. ... ok
modified() retrieves the isModified flag. ... ok
modified(flag) sets the isModified flag. ... ok
Basic configuration settings are applied. ... ok
Color configuration is correctly applied. ... ok
Custom attribute-getters return correct values. ... ok
Enumeration-based configuration is correctly applied. ... ok
Enumeration string-based configuration is correctly applied. ... ok
def foo(var, hash1={}, hash2={})
puts "var: #{var.inspect}"
puts "hash1: #{hash1.inspect}"
puts "hash2: #{hash2.inspect}"
end
> foo('x', 'y', 'z')
var: "x"
hash1: "y"
hash2: "z"
# Enter text in a tinymce editor widget. +iframe_id+ is the
# HTML id of the +iframe+ element containing the editor.
def fill_in_tinymce(iframe_id, text)
within_frame(iframe_id) do
editor = page.find_by_id('tinymce').native
editor.send_keys(text)
end
end
# Return true if we're inside a conditional block, false otherwise.
#
def in_conditional?
return @conditional_stack.length > 1
end
# Return true if we're inside a true conditional block (one that
# evaluated true and should be executed).
#
def in_true_conditional?
describe "pages vs. outgoing(:pages)" do
it "isn't the same thing" do
Neo4j::Transaction.run do
puts "@uri_node.pages: #{@uri_node.pages.inspect}"
puts "@uri_node.outgoing(:pages): #{@uri_node.outgoing(:pages).inspect}"
puts
puts "Appending a page to @uri_node.pages..."
page = Page.new(:name => 'mypage')
@uri_node.pages << page
puts
# ~/git/rsel $ ruby perf/simple-client.rb
# Loop time: 10.555982s
# Total time: 18.245965s
# ~/git/rsel $ ruby perf/simple-webdriver.rb
# Loop time: 18.025064s
# Total time: 24.989934s
# perf/simple-client.rb
# SUMMARY
# This gist shows a performance test between a few different variations of Selenium,
# running against Rsel's unit-test sinatra site (https://github.com/a-e/rsel)
# It repeats these steps 20 times:
#
# - Click "About this site" link
# - Go back to the homepage
# - Click "Form test" link