Jasmine - how to run specific it or describe block?
Just mark needed describes
and its
as ddiscribe
and iit
, and next time you run tests only ddiscribes and iits will be executed. In Jasmine version >= 2.0 use fit
and fdescribe
respectively.
Related cards:
How to create Nokogiri node if node name collide with Nokogiri::XML::Builder methods
Suppose you want to create node with name text
, but this method already present in Nokogiri::XML::Builder. The solution is to add underscore after node name:
Nokogiri::XML::Builder.new do |xml|
xml.text_ 'something' # this should create n...
Rspec + Capybara + Rails4 + Spork (intergation tests setup with selenium and poltergeist)
Add in Gemfile:
group :development, :test do
gem 'rspec-rails'
gem 'spork-rails'
end
group :test do
gem 'capybara'
gem 'database_cleaner'
gem 'email_spec'
gem 'poltergeist'
gem 'launchy'
gem 'selenium-webdriver'
end
Run ...
SSH config for simplify connection to many similar hosts
Suppose you have three hosts (host.one.domain.name, host.two.domain.name host.three.domain.name) with the same credentials, with access by ssh key, then any time when you need to connect to host you must type something like this:
ssh user@hos...
Tell Cucumber where to find step definitions
In case you want to organize your features in sub folders, you must tell Cucumber where to find step definitions for them, for that reason use --require
flag. For example, your features located in folder features/awesome_staff/*.*
, to run them...
`ls` files in directory ordered by modification time
To do this you should type:
ls --full-time -t
The output will be similar to this:
drwxr-xr-x 2 konjoot konjoot 4096 2016-02-06 17:28:20.915296664 +0300 temp
drwxr-xr-x 40 konjoot konjoot 20480 2015-12-22 22:13:37.444222190 +0300...
Setting up Javascript environment with NVM on Ubuntu 14.04
NVM provides you more convenient way to manage and set up your Javascript(Node.js) environment.
First install NVM, note git
must be installed on your sistem:
^
git clone https://github.com/creationix/nvm.git ~/.nvm && cd ~/.nvm && git check...
Run rake tasks from ruby script
require 'rake'
rake = Rake.application
rake.init
# you can import addition *.rake files
# app.add_import 'some/other/file.rake'
rake.load_rakefile
rake['db:test:prepare'].invoke()
Ubuntu 12.04 TeamCity build agent installation
Download build agent archive from your TeamCity server:
wget http://your_teamcity.server.com:8111/update/buildAgent.zip
Unzip it in separate directory:
mkdir buildAgent
^
mv buildAgent.zip buildAgent
^
cd buildAgent
^
un...
ubuntu nginx with txid module
To install nginx with txid module
install nginx-full package:
sudo apt-get install nginx-full
download last nginx source:
wget http://nginx.org/download/nginx-1.9.9.tar.gz
examine what ...
Setting up RubyOnRails environment on Ubuntu 14.04
This tutorial is about setting up environment for RubyOnRails on Ubuntu 14.04.
First of all, update & upgrade your system:
sudo apt-get update
^
sudo apt-get upgrade
^
Install git
and curl
:
sudo apt-get install curl
^
sudo...