sudo curl https://gist.githubusercontent.com/pankaj28843/3ad78df6290b5ba931c1/raw/soffice.sh > /usr/local/bin/soffice && sudo chmod +x /usr/local/bin/soffice
#!/bin/bash
# Need to do this because symlink won't work
# Freelancing Reviews Samples | |
======================================================================= | |
**** | |
======================================================================= | |
## Buyer Reviews to Sellers | |
======================================================================= |
You are writing a spec with type: :request
, i.e. an integration spec instead
of a controller spec. Integration specs are wrappers around Rails'
ActionDispatch::IntegrationTest
class. I usually write controller tests using
this instead of type: :controller
, mainly because it exercises more of the
request and response handling stack. So instead of writing something like
get :index
to start the request, you would write get books_path
or similar.
One of the issues with using type: :request
is that you lose the ability to
These are the scripts that I used to migrate from RSpec to Minitest in a Rails aplication.
It is expected for the test suite to be in RSpec 3.x sintax.
rename
library from Homebrewminitest-rails
gemspec
forder to test
test_helper.rb
fileEver wanted to run your integration/end-to-end test suite at a lower speed so that you better could observe what's happening and perhaps make a recording of it?
Here's a a technique I've been using when writing tests with Capybara Selenium WebDriver.
Put this in test/test_helper.rb
or maybe something like spec/support/capybara.rb
.
These are the steps I went through to set up an SSL cert. Purchase the cert
Prior to purchasing a cert, you need to generate a private key, and a CSR file (Certificate Signing Request). You’ll be asked for the content of the CSR file when ordering the certificate:
openssl req -new -newkey rsa:2048 -nodes -keyout example_com.key -out example_com.csr
git log --stat | grep "^ " | tr -d '[:punct:]' | tr ' ' '\n' | tr 'A-Z' 'a-z' | sort | uniq -c | sort -rn |
abc |
Install MySQL 5.6 in Ubuntu 16.04
Ubuntu 16.04 only provides packages for MySQL 5.7 which has a range of backwards compatibility issues with code written against older MySQL versions.
Oracle maintains a list of official APT repositories for MySQL 5.6, but those repositories do not yet support Ubuntu 16.04. However, the 15.10 repos will work for 16.04.
Uninstall existing mysql 5.7 if any
sudo apt remove mysql-client mysql-server libmysqlclient-dev mysql-common
def within_cell(row, column) | |
within_row(row) do | |
within_column(column) { yield } | |
end | |
end | |
def within_column(column) | |
# Find the table column offset for the column header, then grab the columns' cells at that offset. | |
# Adapted from http://stackoverflow.com/questions/14745478 | |
within(:xpath, "//table/tbody/tr/td[count(//table/thead/tr/th[normalize-space()='#{column}']/preceding-sibling::th)+1]") do |