Skip to content

Instantly share code, notes, and snippets.

Dana Scheider danascheider

Block or report user

Report or block danascheider

Hide content and notifications from this user.

Learn more about blocking users

Contact Support about this user’s behavior.

Learn more about reporting abuse

Report abuse
View GitHub Profile
@danascheider
danascheider / Gemfile
Last active May 26, 2018
Cucumber Ruby Core Issue #153
View Gemfile
source "https://rubygems.org"
ruby "2.4.0"
gem "cucumber", "3.1.0"
gem "watir"
gem "webdrivers"
gem "byebug"
@danascheider
danascheider / .rspec
Created Jul 15, 2016
Function to flatten an array
View .rspec
--format documentation
--color
--require spec_helper
@danascheider
danascheider / README.md
Last active Aug 29, 2015
Sorted Array of 50 Abbreviated US States (Excluding Territories)
View README.md

I had to search everywhere to find a decent sorted array of all 50 states that I could copy and paste into my code. The result was that I had to spend a stupid amount of time copying the damned things myself. Hopefully this can spare others the trouble. Most of the languages I can think of will work with an array in this format with minimal modifications that should be possible using a decent find-and-replace. I hope this saves some other unfortunate developer the headache.

View Testing Element Visibility in Capybara-Cucumber (UNFINISHED)
In this gist I'll show how I solved the problem of testing the visibility of elements using Capybara/Cucumber integration tests. The tests are being run against a locally-hosted site and do not have access to its internals, so I'm leaving the internals out here. Do note that the app itself is written in JavaScript, with only the integration tests being Ruby. The relevant file structure looks like this:
├── features/
| ├── step_definitions/
| | ├── canto_steps.rb
| ├── support/
| | ├── env.rb
| | ├── wait_for_ajax.rb
| ├── dashboard_home.feature
@danascheider
danascheider / README.md
Last active Feb 13, 2017
Testing Backbone View Events with Mocha, Chai, Sinon, and Require.js
View README.md

This gist shows how to test events on Backbone views using Mocha, Chai, Sinon, and Require.js. The directory structure of the project being referenced, based on that of the Canto front end, can be found in my earlier gist about a related testing topic.

@danascheider
danascheider / Intro - Backbone, Require.js, Mocha, and Chai
Last active Apr 18, 2016
Backbone, Require.js, Mocha, and Chai
View Intro - Backbone, Require.js, Mocha, and Chai
This gist is an offshoot of the one by Michael Cox at https://gist.github.com/michaelcox/3800736.
I had been looking for a testing solution for a long time, and his code didn't quite work for me,
so I thought I'd share what finally did.
In all the files I'm showing here, there are additional lines of code that are omitted for brevity.
If you'd like to see the whole thing in action, you can find it at
`https://github.com/danascheider/canto`.
Relevant parts of my directory structure looked like this. The ./js/lib/chai and
./js/lib/mocha directories are the same directories that show up in your node_modules
View Gemfile
source 'https://rubygems.org'
gem 'bundler', '~> 1.5.2'
gem 'rake', '~> 10.3.2'
gem 'certificate_authority', '~> 0.1.6'
You can’t perform that action at this time.