Just install this in your apps like so:
gem 'test-spec-mini', :git => 'git://gist.github.com/1806986.git', :require => 'mini'
| =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') |
| echo 'export PATH=$HOME/local/bin:$PATH' >> ~/.bashrc | |
| . ~/.bashrc | |
| mkdir ~/local | |
| mkdir ~/node-latest-install | |
| cd ~/node-latest-install | |
| curl http://nodejs.org/dist/node-latest.tar.gz | tar xz --strip-components=1 | |
| ./configure --prefix=~/local | |
| make install # ok, fine, this step probably takes more than 30 seconds... | |
| curl https://www.npmjs.org/install.sh | sh |
| # configuration for osx clipboard support | |
| set-option -g default-command "reattach-to-user-namespace -l sh" |
| Copyright (C) 2011 by Colin MacKenzie IV | |
| Permission is hereby granted, free of charge, to any person obtaining a copy | |
| of this software and associated documentation files (the "Software"), to deal | |
| in the Software without restriction, including without limitation the rights | |
| to use, copy, modify, merge, publish, distribute, sublicense, and/or sell | |
| copies of the Software, and to permit persons to whom the Software is | |
| furnished to do so, subject to the following conditions: | |
| The above copyright notice and this permission notice shall be included in |
| module SoftDelete | |
| extend ActiveSupport::Concern | |
| included do | |
| define_model_callbacks :soft_delete | |
| define_model_callbacks :recover | |
| default_scope where(:deleted_at => nil) | |
| class_eval do | |
| class << self | |
| alias_method :with_deleted, :unscoped |
Just install this in your apps like so:
gem 'test-spec-mini', :git => 'git://gist.github.com/1806986.git', :require => 'mini'
| # This is an example of how to use database_cleaner gem and | |
| # RSpec tags to make `after_commit` hook play nice with | |
| # `use_transactional_fixtures`. | |
| # Simply mark the specs that use after_commit with | |
| # `:uses_after_commit` tag. | |
| # ... | |
| require 'database_cleaner' |
| { | |
| "template": "logstash-*", | |
| "settings" : { | |
| "number_of_shards" : 1, | |
| "number_of_replicas" : 0, | |
| "index" : { | |
| "query" : { "default_field" : "@message" }, | |
| "store" : { "compress" : { "stored" : true, "tv": true } } | |
| } | |
| }, |
| /** | |
| * Overwrites default Mousetrap.bind method to optionally accept | |
| * an object to bind multiple key events in a single call | |
| * | |
| * You can pass it in like: | |
| * | |
| * Mousetrap.bind({ | |
| * 'a': function() { console.log('a'); }, | |
| * 'b': function() { console.log('b'); } | |
| * }); |