Skip to content

Instantly share code, notes, and snippets.

@danielevans
Created March 16, 2012 21:46
Show Gist options
  • Save danielevans/2052937 to your computer and use it in GitHub Desktop.
Save danielevans/2052937 to your computer and use it in GitHub Desktop.
capybara-webkit pushState issue demonstration
++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
http://127.0.0.1:54850/
/
--------------------------------------------------------------------------------
++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
http://127.0.0.1:54850/
/
--------------------------------------------------------------------------------
visit "/"
page.execute_script("window.history.pushState({}, '', '/simon-tam')")
puts '+'*80
puts page.current_url
puts page.current_path
puts '-'*80
page.execute_script("window.history.pushState({}, '', '/malcolm-reynolds')")
puts '+'*80
puts page.current_url
puts page.current_path
puts '-'*80
ruby -v
ruby 1.9.3p125 (2012-02-16 revision 34643) [x86_64-darwin11.2.0]
bundle list | grep -i capybara
* capybara (1.1.2)
* capybara-webkit (0.11.0)
uname -a
Darwin vorash.local 11.3.0 Darwin Kernel Version 11.3.0: Thu Jan 12 18:47:41 PST 2012; root:xnu-1699.24.23~1/RELEASE_X86_64 x86_64
gcc -v
Using built-in specs.
Target: i686-apple-darwin11
Configured with: /private/var/tmp/llvmgcc42/llvmgcc42-2336.1~22/src/configure --disable-checking --enable-werror --prefix=/Developer/usr/llvm-gcc-4.2 --mandir=/share/man --enable-languages=c,objc,c++,obj-c++ --program-prefix=llvm- --program-transform-name=/^[cg][^.-]*$/s/$/-4.2/ --with-slibdir=/usr/lib --build=i686-apple-darwin11 --enable-llvm=/private/var/tmp/llvmgcc42/llvmgcc42-2336.1~22/dst-llvmCore/Developer/usr/local --program-prefix=i686-apple-darwin11- --host=x86_64-apple-darwin11 --target=i686-apple-darwin11 --with-gxx-include-dir=/usr/include/c++/4.2.1
Thread model: posix
gcc version 4.2.1 (Based on Apple Inc. build 5658) (LLVM build 2336.1.00)
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment