This is the reference point. All the other options are based off this.
|-- app
| |-- controllers
| | |-- admin
| @class GHTestCase; | |
| @interface GHTestCase (Swizzle) | |
| + (id)sharedMock; | |
| + (void)setSharedMock:(id)newMock; | |
| - (void)swizzle:(Class)target_class selector:(SEL)selector; | |
| - (void)deswizzle; |
| =Navigating= | |
| visit('/projects') | |
| visit(post_comments_path(post)) | |
| =Clicking links and buttons= | |
| click_link('id-of-link') | |
| click_link('Link Text') | |
| click_button('Save') | |
| click('Link Text') # Click either a link or a button | |
| click('Button Value') |
| # ... | |
| gem 'padrino-warden', :git => "git://github.com/zmack/padrino-warden.git" | |
| gem 'authtools' |
| var cradle = require('cradle'); | |
| var database = 'app'; | |
| cradle.setup({ | |
| host: '127.0.0.1', | |
| port: 5984, | |
| auth: { username: "YOUR_USERNAME", password: "YOUR_PASSWORD" } | |
| }); |
| RSpec.configure do |config| | |
| config.before(:all, &:silence_output) | |
| config.after(:all, &:enable_output) | |
| end | |
| # Redirects stderr and stdout to /dev/null. | |
| def silence_output | |
| @orig_stderr = $stderr | |
| @orig_stdout = $stdout |
| tell application "Google Chrome" | |
| set theTitle to title of active tab of front window | |
| set theURL to URL of active tab of front window | |
| end tell | |
| tell application "OmniFocus" | |
| set theDoc to default document | |
| set theTask to theTitle | |
| set theNote to theURL | |
| # Install pow | |
| $ curl get.pow.cx | sh | |
| # Install powder | |
| $ gem install powder | |
| # See that firewall is fucked | |
| $ sudo ipfw show | |
| 00100 0 0 fwd 127.0.0.1,20559 tcp from any to me dst-port 80 in <- THIS ONE!!! | |
| 65535 81005 28684067 allow ip from any to any |
| # put the file into spec/support | |
| shared_examples_for "ActiveModel" do | |
| include ActiveModel::Lint::Tests | |
| # to_s is to support ruby-1.9 | |
| ActiveModel::Lint::Tests.public_instance_methods.map{|m| m.to_s}.grep(/^test/).each do |m| | |
| example m.gsub('_',' ') do | |
| send m | |
| end | |
| end |
As configured in my dotfiles.
start new:
tmux
start new with session name: