This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| # Requires jquery.hammer.js | |
| # Requires wiselinks | |
| # Add class 'tapit' to any clickable element on the page | |
| tapAction = (element) -> | |
| $(element).hammer().on 'tap', -> | |
| $(this).fadeOut { | |
| duration: 200 | |
| } | |
| $(this).fadeIn { |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Gem::Specification.new do |s| | |
| s.name = "expect4r" | |
| s.version = '0.1.0' | |
| s.files = Dir["{lib,spec}/**/*", "[A-Z]*", "init.rb"] - ["Gemfile.lock"] | |
| s.require_path = "lib" | |
| s.summary = 'Expect functionality for network equipment' | |
| s.author = '' | |
| end |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| # Default value for :user_id is generated in this function | |
| def create_project(options = {}) | |
| options.reverse_merge!( | |
| :user_id => @user.id | |
| ) | |
| FactoryGirl.create(:new_project, options) | |
| end |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| context 'my element' do | |
| before do | |
| a =<< EOF | |
| jQuery -> | |
| $('body').append('<div id=empty_or_hidden_element></div>') | |
| EOF | |
| page.execute_script CoffeeScript.compile(a) | |
| end | |
| it 'should not be displayed' do |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| #spec/support/capybara.rb | |
| require 'capybara/rspec' | |
| # Using chrome as browser to test in capybara. | |
| Capybara.register_driver :selenium do |app| | |
| Capybara::Selenium::Driver.new(app, :browser => :chrome) | |
| end |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| # feature/support/login_helper.rb | |
| require 'spec/support/login_helper' | |
| Before do | |
| extend LoginHelper | |
| @user = FactoryGirl.create(:user) | |
| login_as @user | |
| end |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| */.gitkeep | |
| tmp/ |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| When /^I click the clear search button$/ do | |
| find('#search_icon').click | |
| end | |
| Then /^the search field should be focused$/ do | |
| page.execute_script <<-JS | |
| if (jQuery('#search_form input[type=search]').is(':focus')) { | |
| jQuery('#search_form').append("<div id='search_form_is_focused' />"); | |
| } | |
| JS |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| ## /spec/support/mock_geo.rb | |
| ## MockGeo takes an address in the following format and can produce | |
| ## fake google geocode output | |
| ## All country and state information resolves to North Carolina, USA | |
| ## Include "gem jbuilder in :test and :development group" if not already in the project. | |
| ## Example | |
| ## Output for address string *MUST* be in this format | |
| ## a = '102 My Street, My Town, , NC, 99903' OR | |
| # a = '102 my street, my town, nc' | |
| ## b = MockGeo.new(:addr => a) |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| runtime bundle/pathogen/autoload/pathogen.vim | |
| call pathogen#infect() | |
| call pathogen#helptags() | |
| syntax on | |
| filetype plugin indent on | |
| set number | |
| set tabstop=2 | |
| set shiftwidth=2 | |
| set expandtab | |
| set textwidth=80 |