Skip to content

Instantly share code, notes, and snippets.

<?php
/**
* Debian local configuration file
*
* This file overrides the settings made by phpMyAdmin interactive setup
* utility.
*
* For example configuration see /usr/share/doc/phpmyadmin/examples/config.default.php.gz
*
* NOTE: do not add security sensitive data to this file (like passwords)
How to get Cucumber working with Spree
#This is a work in progress..
1. Ensure you have the latest version of cucumber
> gem install cucumber
2. gem list cucumber
get the version number of the latest version of cucumber you have installed.
def get_file
@instruction_file = gets.chomp
initialize_file
end
def initialize_file
@instruction_file = "instructions/input1.txt" if @instruction_file.nil? || @instruction_file.empty?
end
class TwatsController < ApplicationController
def new
@twat = Twat.new
end
end
require 'spec_helper'
1. Create a new rails app
Rails twatter
1b. Initialise git
git init
git add .
git commit -a -m 'Initial Comit, empty rails app'
2. generate cucumber files
script/generate cucumber
#Rspec code for the tutorial RSpec Rails tutorial
#Developing a Rails model using BDD and RSpec, Part 1 (by Luke Redpath)
#http://lukeredpath.co.uk/blog/developing-a-rails-model-using-bdd-and-rspec-part-1.html
#Code updated based on my understanding of the current versions and convetions of RSpec in 2009.
require 'spec_helper'
describe User do
before(:each) do