Skip to content

Instantly share code, notes, and snippets.

View robholland's full-sized avatar

Rob Holland robholland

View GitHub Profile
diff --git a/lib/cucumber/cli/options.rb b/lib/cucumber/cli/options.rb
index 1653fcd..cb63ebf 100644
--- a/lib/cucumber/cli/options.rb
+++ b/lib/cucumber/cli/options.rb
@@ -352,6 +352,7 @@ module Cucumber
end
@options[:source] &= other_options[:source]
@options[:snippets] &= other_options[:snippets]
+ @options[:strict] |= other_options[:strict]
diff --git a/lib/capybara/driver/selenium_driver.rb b/lib/capybara/driver/selenium_driver.rb
index d78cc51..70cc145 100644
--- a/lib/capybara/driver/selenium_driver.rb
+++ b/lib/capybara/driver/selenium_driver.rb
@@ -17,13 +17,13 @@ class Capybara::Driver::Selenium < Capybara::Driver::Base
end
def set(value)
- if tag_name == 'textarea' or (tag_name == 'input' and %w(text password hidden file).include?(type))
- node.clear
module RailsJavascriptEmulation
def self.included(base)
base.class_eval do
alias_method :click_without_rails_javascript_emulation, :click
end
end
def click_with_rails_javascript_emulation
if tag_name == 'a' and node['onclick'] =~ /m\.setAttribute\('name', '_method'\)/
method = node['onclick'].match(/m\.setAttribute\('value', '([^']*)'\)/)[1]
require 'benchmark'
count = 10000
Benchmark.bm do |x|
x.report { a = []; count.times { a += [1] } }
x.report { a = []; count.times { a.concat([1]) } }
end
# user system total real
Scenario: AJAX test # features/manage_items.feature:34
When I visit the items page # features/step_definitions/item_steps.rb:5
Then I should see "Don't Click me" # features/step_definitions/webrat_steps.rb:123
undefined method `locate_element' for #<Rack::Response:0x257810c> (NoMethodError)
/Users/rob/dev/test/steam/vendor/plugins/steam/lib/steam/matchers/html_unit.rb:11:in `matches?'
/opt/local/lib/ruby/gems/1.8/gems/rspec-1.2.9/lib/spec/expectations/handler.rb:11:in `handle_matcher'
/opt/local/lib/ruby/gems/1.8/gems/rspec-1.2.9/lib/spec/expectations/extensions/kernel.rb:27:in `should'
./features/step_definitions/webrat_steps.rb:124
/opt/local/lib/ruby/gems/1.8/gems/cucumber-0.4.4/bin/../lib/cucumber/core_ext/instance_exec.rb:48:in `instance_exec'
/opt/local/lib/ruby/gems/1.8/gems/cucumber-0.4.4/bin/../lib/cucumber/core_ext/instance_exec.rb:48:in `cucumber_instance_exec'
#!/usr/bin/env ruby
# == Synopsis
#
# caching_proxy: Caching proxy server which will cache GET and POST requests.
#
# Rob Holland <rob@inversepath.com>
#
# == Usage
#
require 'dm-core'
class A
include DataMapper::Resource
property :id, Serial
has n, :bs, :through => Resource
end
class B
ENV['RACK_ENV'] = 'test'
gem 'rack-test', '=0.3.0'
gem 'aslakhellesoy-webrat', '=0.4.4.1'
# Sinatra
app_file = File.join(File.dirname(__FILE__), *%w[.. .. ranker.rb])
require app_file
# Force the application name because polyglot breaks the auto-detection logic.
ByteBuffer.java:328:in `allocate': java.lang.IllegalArgumentException
from SSLSocket.java:426:in `sysread'
from org/jruby/ext/openssl/SSLSocket$i_method_0_1$RUBYINVOKER$sysread.gen:-1:in `call'
from JavaMethod.java:624:in `call'
from DynamicMethod.java:172:in `call'
from CachingCallSite.java:155:in `call'
from FCallTwoArgNode.java:38:in `interpret'
from ReturnNode.java:88:in `interpret'
from NewlineNode.java:104:in `interpret'
from RescueNode.java:225:in `executeBody'
^\Full thread dump Java HotSpot(TM) Client VM (1.5.0_16-133 mixed mode, sharing):
"Thread-2" daemon prio=5 tid=0x01032a00 nid=0x839a00 in Object.wait() [0xb130c000..0xb130cd90]
at java.lang.Object.wait(Native Method)
- waiting on <0x0d015a68> (a java.lang.Object)
at org.jruby.util.ShellLauncher$StreamPumper.run(ShellLauncher.java:742)
- locked <0x0d015a68> (a java.lang.Object)
"Thread-1" daemon prio=5 tid=0x01032850 nid=0x838c00 in Object.wait() [0xb120b000..0xb120bd90]
at java.lang.Object.wait(Native Method)