Skip to content

Instantly share code, notes, and snippets.

@losvedir
losvedir / rspec-syntax-cheat-sheet.rb
Created May 11, 2012 15:45 — forked from dnagir/rspec-syntax-cheat-sheet.rb
RSpec 2 syntax cheat sheet by example
# RSpec 2.0 syntax Cheet Sheet by http://ApproachE.com
# defining spec within a module will automatically pick Player::MovieList as a 'subject' (see below)
module Player
describe MovieList, "with optional description" do
it "is pending example, so that you can write ones quickly"
it "is already working example that we want to suspend from failing temporarily" do
pending("working on another feature that temporarily breaks this one")
@losvedir
losvedir / 1 - NEW _delivery.html.erb
Created March 22, 2012 22:16
Convert delivery methods from radio buttons to select options
<%= form.select :shipping_method, shipping_methods_for_select(@order) %>
@losvedir
losvedir / 1 - NEW _delivery.html.erb
Created March 22, 2012 22:13
Convert delivery methods from radio buttons to select options
<%= form.select :shipping_method, shipping_methods_for_select(@order) %>