| hello | world | | ----- + ------| | Fooo | Bar |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| require "capybara" | |
| html = DATA.read | |
| app = proc { |env| [200, { "Content-Type" => "text/html" }, [html] ] } | |
| sess = Capybara::Session.new(:selenium, app) | |
| sess.visit("/") | |
| sess.click_link("Click me") | |
| sess.reset! |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| source "http://rubygems.org" | |
| ruby "2.3.0" | |
| gem "selenium-webdriver" | |
| gem "capybara", "2.7.0" |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| # Prevents requests from hitting the Rails app after the test has finished. | |
| class CapybaraRequestBlockerMiddleware | |
| # assignment to initialized instance variables is thread safe in Ruby | |
| @enabled = false | |
| class << self | |
| def enabled? | |
| @enabled | |
| end |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Compiling graphers v0.1.0 (file:///Users/jonasnicklas/Projects/graphers) | |
| src/parse/grammar.rs:390:13: 390:60 error: unreachable pattern [E0001] | |
| src/parse/grammar.rs:390 Some((__loc1, Tok::Identifier(__tok0), __loc2)) => { | |
| ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ | |
| src/parse/grammar.rs:390:13: 390:60 help: run `rustc --explain E0001` to see a detailed explanation | |
| src/parse/grammar.rs:438:13: 438:60 error: unreachable pattern [E0001] | |
| src/parse/grammar.rs:438 Some((__loc1, Tok::Identifier(__tok0), __loc2)) => { | |
| ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ | |
| src/parse/grammar.rs:438:13: 438:60 help: run `rustc --explain E0001` to see a detailed explanation | |
| src/parse/grammar.rs:481:13: 481:45 error: unreachable pattern [E0001] |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| <!doctype html> | |
| <html> | |
| <body> | |
| <ul> | |
| </ul> | |
| <script> | |
| (function() { | |
| var a = 10, b = 20; |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| class Underscore < BasicObject | |
| def initialize(invocations = []) | |
| @invocations = invocations | |
| end | |
| def to_proc | |
| invocations = @invocations | |
| ::Kernel.lambda do |val| | |
| invocations.reduce(val) do |val, (name, args, block)| | |
| val.send(name, *args, &block) |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| require 'benchmark/ips' | |
| require 'memoit' | |
| class Tested | |
| def manual | |
| @manual ||= 123 | |
| end | |
| def manual_hash(key) | |
| @manual_hash ||= {} |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| standard_error.rs:14:28: 14:35 error: cannot infer an appropriate lifetime for pattern due to conflicting requirements | |
| standard_error.rs:14 StandardErrorWrapped(ref err) => err.description() | |
| ^~~~~~~ | |
| standard_error.rs:14:40: 14:43 note: first, the lifetime cannot outlive the expression at 14:39... | |
| standard_error.rs:14 StandardErrorWrapped(ref err) => err.description() | |
| ^~~ | |
| standard_error.rs:14:40: 14:43 note: ...so that pointer is not dereferenced outside its lifetime | |
| standard_error.rs:14 StandardErrorWrapped(ref err) => err.description() | |
| ^~~ | |
| standard_error.rs:12:5: 15:6 note: but, the lifetime must be valid for the match at 12:4... |