Skip to content

Instantly share code, notes, and snippets.

View phosphene's full-sized avatar

Ed Phillips phosphene

View GitHub Profile
# http://blog.firsthand.ca/2011/12/example-using-rspec-double-mock-and.html
describe Transfer do
context "transfer with amount of 10" do
let(:source_account) { double :source_account, :decrease => nil }
let(:destination_account) { double :destination_account, :increase => nil }
def transfer_amount(amount)
Transfer.new(source_account, destination_account, amount).call
end
=Navigating=
visit('/projects')
visit(post_comments_path(post))
=Clicking links and buttons=
click_link('id-of-link')
click_link('Link Text')
click_button('Save')
click('Link Text') # Click either a link or a button
click('Button Value')

logstash json format

{
  "message"    => "hello world",
  "@version"   => "1",
  "@timestamp" => "2014-04-22T23:03:14.111Z",
  "type"       => "stdin",
  "host"       => "hello.local"
}