Skip to content

Instantly share code, notes, and snippets.

View jbpros's full-sized avatar
🖐️
yo

Julien Biezemans jbpros

🖐️
yo
View GitHub Profile
// features/support/stack_filter.js
module.exports = function () {
var path = require('path');
var filteredPathPrefix = path.resolve(__dirname, '..', '..');
var originalPrepareStackTrace;
if (originalPrepareStackTrace = Error.prepareStackTrace) {
Error.prepareStackTrace = function (error, stack) {
var originalString = originalPrepareStackTrace(error, stack);
@jbpros
jbpros / app.js
Last active August 29, 2015 13:56 — forked from anonymous/app.js
app.post(/^\/mobiles\/.*/, function (req, res) {
var postUrl = "https://d3v0fbs.net" + req.url;
req.pipe(request.post(postUrl)).pipe(res);
});
var webdriver = require("selenium-webdriver");
var launchSelenium = require("selenium-launcher");
var selenium;
launchSelenium(function (err, _selenium) {
selenium = _selenium;
process.on('exit', function () {
selenium.kill();
});
});
Feature: fire at ships
Players want to fire at their opponent's ships so that they
can sink their whole fleet and have fun winning games.
* a player can fire at positions on the opponent's grid
* player can hit a ship or miss
* player hits the last remaining position of a ship: th ship is sunk
* two players
* turn-by-turn game
<!doctype html>
<html lang="en">
<head>
<meta charset="utf-8">
<meta name="viewport" content="width=device-width, initial-scale=1.0">
<meta name="description" content="Angular.js training">
<meta name="author" content="Julien Biezemans (@jbpros) <[email protected]>">
<title>Angular.js training</title>
<link rel="stylesheet" href="/components/bootstrap/dist/css/bootstrap.css" media="screen">
<script src="/components/angular/angular.js"></script>
ENV['RAILS_ENV'] = ENV['RAILS_ENV'] || 'development'
require File.expand_path(File.dirname(__FILE__) + "/../../config/environment")
Feature: squeak
A squawk
Acceptance criteria:
- see my own squawks
- see the squawks from people I follow
- don't see squawks from people I don't follow
Background:
Given I am logged in
Feature:
Scenario: miss
Given my opponent has no ships on a specific position
When I shoot a torpedo at that position
Then I missed
Scenario: hit
Given my opponent has some ship on a specific position
When I shoot a torpedo at that position
@jbpros
jbpros / test.feature
Last active December 16, 2015 05:59 — forked from anonymous/gist:5388516
Scenario: Create an invoice
Given I am an authenticated user with an admin role
And there is a work unit ready to be invoiced on a client's project
When I associate an invoice number to the work unit
Then The concerned client is not in the admin invoices page
Feature: Mailing Wizard
In order to send a Mailing
As an Administrator
I need to be able to create a Mailing
Scenario: Check the first tab has fields
Given I am on the Mailing Wizard
When I am on the first tab
Then I should see a "Mailing Name" input
And I should see a "Description" input