Clojure standard library includes a general unit testing library clojure.test. There are several other libraries created for a specific purpose in mind. One of them is Kerodon, inspired by Ruby’s Capybara. Kerodon helps you test Ring-based web applications by simulating how a user would interact with your app. The goal of Kerodon is to provide […]
Setting Up the BDD Stack on a New Rails 4 Application
Introduction This tutorial guides you through generating a new Rails 4 application with RSpec and Cucumber as testing tools. If you’d like to learn how to set up a BDD stack on a Rails 5 application, this tutorial is the best next read for you. RSpec is a testing tool often used for writing unit […]
RSpec Subject, Helpers, Hooks and Exception Handling
We are continuing an introduction to RSpec, a testing tool for Ruby. After covering the very basics in the first part of this series, we will now explore other important and frequently used features of RSpec: use of subject, let helper method, before hooks and exception handling. Along the way we will encounter some more […]
NPM – Node.js package manager
NPM is a Node.js package manager that comes bundled with the installation of Node.js. It keeps track of all dependencies for your Node.js projects and gives you full control over managing them. NPM makes is easy to reuse thousands of existing open source packages that solve a multitude of common problems, as well as share […]
Mocking with RSpec: Doubles and Expectations
Mocking is a technique in test-driven development (TDD) that involves using fake dependent objects or methods in order to write a test. There are a couple of reasons why you may decide to use mock objects: As a replacement for objects that don’t exist yet. When you are working with objects which return non-deterministic values […]
Integration testing PHP applications with Behat
Software testing is slowly becomming second nature for many developers. Knowing that your changes aren’t breaking any existing feature gives a huge confidence boost when deploying. The PHP community isn’t the first to adopt the methologies of TDD (Test-Driven Development) but it’s catching up quickly with the rest. The testing community is growing rapidly and […]
Integration Testing for Chef-Driven Infrastructure with Test Kitchen
Introduction A big obstacle to the mission to treat infrastructure as code is the way we test it. In the past, the practice of writing automated tests for infrastructure did not exist. Instead, the process was manual, repetitive and error-prone: we would log into a remote machine and run various commands to verify the system. […]
Ideas for Semaphore Community Articles
The Semaphore Community is open for contributions by all developers who would like to write an article for our knowledge base. We encourage you to cover topics you are passionate about and have experience with. Nevertheless, it is useful to also have a general list of topics that we are interested in covering. Here’s an […]
How to write a custom Kerodon matcher
Kerodon provides a friendly API for interacting with web pages in tests. With Kerodon you write a test from the perspective of a user interacting with a web application from a browser. It provides helpers for visiting a page, clicking on a button or a link, interacting with a form and inspecting the page content. […]
How to Write an Article for Semaphore Blog
Semaphore is excited about building a collection of technical articles that help everyone become a well-rounded software developer. Our goal is to cover both cutting-edge technology and timeless topics on building products and collaborating within an engineering team. For this reason, the Semaphore blog is open for contributions and the goal of this article is […]
How to Format Semaphore Tutorials for Publishing
Introduction This article explains how to format Semaphore tutorials. By following the details in this guide and the companion Style Guide, your tutorial will match all of the Semaphore guidelines. Where can I submit the completed tutorial? If you have an approved writing sample and topic, you can submit the tutorial as a link to […]
How to Deploy Node.js Applications with Capistrano
Introduction Capistrano is a popular tool for web application deployment, especially in the Ruby ecosystem where it originated. But Capistrano is being used to deploy applications made in any programming language. It is a perfectly fine tool for deploying Node.js projects too. in the Ruby ecosystem. This article will explain how to set up a […]
How to Deploy a Compojure Application to OpenShift
Introduction OpenShift is Red Hat’s cloud computing platform as a service. It’s based on open source OpenShift Origin project. The platform officially supports a number of languages: Java, PHP, Ruby, Node.js, Python and Perl. Since the platform is open source, other languages and platforms are supported by community-maintained cartridges. A cartridge is a set of […]
Introduction to Gradle
Gradle is a free Java build tool for project automation, similar to Ant and Maven. It’s used by software developers working in Java for running common repetitive tasks in project lifecycle, like compiling code, resolving dependencies, packaging, unit testing, code execution and deployment. Google positioned Gradle as the build system of choice for Android and […]
Getting Started with SSH
Introduction Over the last fifteen years, SSH has become a standard tool for remote management of Unix-like systems and many network devices. SSH stands for Secure Shell, and is one of the ways to get a command line (shell) access on a remote machine. It was designed to be a secure alternative to previous access […]