Skip to content

Instantly share code, notes, and snippets.

View DylanFM's full-sized avatar

Dylan Fogarty-MacDonald DylanFM

View GitHub Profile
cucumber master: cucumber examples/rspec_doubles/features/mocking.feature
Using the default profile...
F--F
Failing Scenarios:
cucumber examples/rspec_doubles/features/mocking.feature:5 # Scenario: Mock a transmogrifier
1 scenario (1 failed)
2 steps (2 skipped)
0m0.002s
# require 'cucumber/rspec/doubles'
# The code below is copied from the above file
# It wasn't working, but this does for some reason
require 'rspec/core'
RSpec.configuration.configure_mock_framework
World(RSpec::Core::MockFrameworkAdapter)
Before do
RSpec::Mocks::setup(self)
Gems included by the bundle:
* abstract (1.0.0)
* actionmailer (3.0.0)
* actionpack (3.0.0)
* activemodel (3.0.0)
* activerecord (3.0.0)
* activeresource (3.0.0)
* activesupport (3.0.0)
* addressable (2.2.0)
* arel (1.0.1)
<!DOCTYPE html>
<html>
<head>
<meta charset="utf-8" />
<title>Image popup</title>
<style>
div {width:160px}
div h1, div p {display:none}
div:hover {width:250px;padding:1em;border:1px solid #ccc}
div:hover h1, div:hover p {display:block}
window.boundEvents = { all: { count: 0, elements: [] } };
// Collect all the events
$('html').find('*').andSelf().each(function() {
var events = $(this).data('events');
if ($.isPlainObject(events) === true) {
$.each(events, function(n, e) {
if (window.boundEvents[n] === undefined) {
window.boundEvents[n] = { count: 0, elements: [] };
}
});
[submodule "express"]
path = vendor/express
url = http://github.com/visionmedia/express.git
(function(a,b,c) {}).length
>> 3
(function(a,b,c,d,e,f) {}).length
>> 6
(function() {}).length
>> 0
Commands for Moving
beginning-of-line (C-a)
Move to the start of the current line.
end-of-line (C-e)
Move to the end of the line.
forward-char (C-f)
Move forward a character.
backward-char (C-b)
Move back a character.
forward-word (M-f)
I'm just going to list out a few books for you. They relate to quite a few different sections of web design and development, but it's good to cover a broad bunch of subjects when building a foundation.
Don't Make Me Think by Steve Krug
http://www.sensible.com/dmmt.html
This is probably the most important book I've read and I wouldn't be surprised if it stays that way. Don't Make Me Think is about usability -- it teaches you how to build really simple websites that work. Often we complicate things when we make websites, but by reading this book you save yourself from making a ton of mistakes.
Designing With Web Standards [3rd Edition] by Jeffrey Zeldman
http://www.zeldman.com/dwws/
Web Standards are a set of principles and processes that should be followed when building a website. Most websites out there don't really adhere to them, and if they do it's only with a gentle nod. When you follow web standards you get a whole lot of benefits, some being less code (and less problems), better accessibility, better
class Post
attr_accessor :data
def initialize(data)
@data = Hashie::Mash.new(data)
end
def method_missing(key, *args)
data.send(key)